A very special feature

cpik works in a unusual way: unlike other compilers, it does not produce ordinary assembler code but source libraries.

A source library looks like a PIC 18 asm source file, with .slb extension. This file can be processed by an assembler (such as mpasm or gpasm) but contains special comments that are intended to be used as directives by the linker. This linker is included in cpik itself, so the cpik command can be used for both compilation and link tasks.

The important point is that cpik linker works at assembly source code level: it picks needed "modules" from source libraries and copies them in a single output file. In other words, cpik performs linking before assembly stage (In contrast, most linkers work from the object code generated by an assembler).

The file generated by the linker is easy to verify manually, and I suppose (and hope) that advanced users will examine it and will send feedbacks about the code.

This unusual approach presents for me several advantages:

In fact, the «source library» approach might be rather slow, but, as microcontrollers applications are not huge, your computer will build ready-to-burn hex files at speed of light.

Figure: Result of the very first program compiled by cpik ever executed
Image 1stprogram



Footnotes

... program3
Believe it or not, this program (a simple for loop) worked successfully at the first execution. To be honest, this execution has been preceded by many manual check of the generated code.
Alain Gibaud 2015-07-09