|
CPIK (the C compiler for PIC18 devices) is now released under GPL licence.
CPIK V0.5 is an easy to use, near ANSI C compiler which is fully integrated
with PikDev. This project is still in progress but the current version is perfectly usable
(from Pikdev or from command-line interpreter).
Contributors for this project are Welcome - please read the documentation
for details about how to contribute.
Roadmap:
- V0.6 Support for IEEE-754 floating point numbers
- V0.7 Optimizer improvement
- V0.8 Libraries
See here the PDF documentation.
Contact: Drop me an email here
What is new:
-in version 0.5.0 (Sienna)
- Full support for 32 bit signed and unsigned integers
- Rewritten support for side-effect operators such as +=, *=, etc.
-in version 0.4.1 (release 1 & 2) (Alain Bashung)
- Bug fix in return statement: please upgrade !
- Bug fix when passing arrays as function parameters
- New tutorial about LCD display support and A/D conversion
- Totally rewritten support for static entities initialization:
initialization of static structs and unions is now supported, initializer expressions containing constant symbolic data are supported
- Bug fix when compiling a malformed expression (r 2) please upgrade !
- Bug fix in sizeof operator when applied to undeclared variable (r 2)
- Array size specified by a constant expression (ie: 1+2*3) is now supported (r 2)
-in version 0.4.0 (Barcelona)
- ANSI compliant support for struct and union
- Many code optimizer improvements
- Comes with a simple tutorial dedicated to beginners
CPIK tutorial:
The tutorial is now provided as a separate PDF file .
It includes schematics and C source code.
This code can be downloaded separatly as a compressed archive
I strongly encourage people who intend to switch to PIC18 and/or C language
to read this tutorial. PIC18 devices represent a huge improvement compared to
their 16F counterpart, and are not really much more expensive.
The C language is really flexible and powerful, so it is a pity that people continue to write assembly code although this is generally not necessary.
Distribution:
CPIK is distribued in two tarballs:
-
The binary version is sufficient to develop C code for PIC. It contains the compiler itself, a run-time library, some specialized libraries, headers and documentation.
Most libraries have been developped for testing purpose, so they are not very versatile.
As I do not have enough time to do everything, new or better libraries are welcome.
-
The source version is useful if you plan to contribute to the compiler, or just want to rebuild the application from source. This code is released under GPL license.
See below installation details.
Caution: If you plan to build the compiler from source code, you must
also install the precompiled binary package, because the source package does not contain
neither libraries nor devices specific headers.
Don't forget to download and install PiKdev version >= 1.1.0 which
have support for cpik C projects and PicKit2 USB programmer.
Debian/Ubuntu users can install cpik directly from .deb package.
INSTALLATION OF PRECOMPILED BINARY FROM TARBALL
INSTALLATION OF PRECOMPILED BINARY FROM DEBIAN ARCHIVE
BUILD FROM SOURCE CODE
-
Unpack the archive
tar xzvf cpik-[version]-src.tar.gz
- Go to cpik directory
cd cpik
-
Generate the Makefile (you need the qmake utility, from Qt toolkit)
qmake -o Makefile cpik[version].pro (version should be 04x for v0.4.x)
- Build the application
make
- become root
su
Password: [root passwd]
- install the executable in proper directory
make install
- Return to user mode
exit
|