- math library
- installation and
- supported chips
| Welcome to the CC5X C compiler
for the Microchip PICmicro family. The PIC microcontrollers are popular for cost critical
applications. The CC5X C compiler was designed to enable best possible usage of the
limited code and RAM space offered by PICmicro devices. The priority was not to provide
full ANSI C support, but to generate compact and optimized code.
The PICmicro architecture is efficient compared to the load/store approach used by many other microcontrollers and microprocessors. However, the bit and page bit updating represent a challenge for the programmer when writing PICmicro application code. The CC5X compiler offers automatic updating of these bits, using advanced optimization to save code space compared to simpler compiler implementations.
CC5X can be selected as a tool in MPLAB. MPLAB offers an integrated environment including editor and tool support (compilers, assemblers, simulators, emulators, chip programmers). Compilation errors are easily handled. MPLAB supports point-and-click to go directly to the source line that needs correction. CC5X supports the COD file format used by MPLAB for program debugging. CC5X offers two modes of source file debugging is available: C or assembly mode. Thus, tracing programs in MPLAB can be done using assembly instructions or C statements. MPLAB is free, and can be downloaded from Microchip.
Local variables are supported. The CC5X compiler performs a safe compression by checking the scope of the variables and reusing the RAM locations when possible. The limited RAM space is therefore used efficiently. Interrupt support can be tricky. The CC5X compiler allows every statement to be written in C code. The CC5X compiler can extend the call level restrictions by using GOTO statements when possible. This feature is almost required for the 12 bit core devices having 2 call levels only.
All midrange devices (PIC10/PIC12/PIC14/PIC16) are supported through header files. The inline assembly capabilities allows existing assembly routines to be included in new C applications.
Version 1.0 of CC5X was released in April 1992 and was probably the first C compiler for PICmicros. The free compiler edition can be downloaded and tested.
Programming in C gives you the following advantages:
The CC5X compiler was written with code efficieny as the main goal.
Normally, an assembler programmer will not be able to beat the code efficiency of a C programmer using CC5X. CC5X allow low level tuning of the code, which means that the C programmer will finish writing an efficient implementation long before the assembly programmer.