Frequently Asked Questions

Compiling a Program from an Existing File/Project

  1. Open the CCS PCW IDE and select File -> Open from the ribbon along the top of the main window or from the menu bar if using the classic style IDE. Make sure that the name of the project to compile appears at the bottom of the IDE Editor window. If the project is already opened, multiple projects are open, or the project name does not appear at the bottom of the editor, right-click on the program you want to compile and select Make File Project from the pop-up menu.

  2. Select Compile to view the compiler options. From the drop-down menu, select the type of compiler to use for compiling the program. There are four types of compilers:

CCS IDE Select Compiler

CCS C Compilers
Compilers Purpose
PCB 12 Uses the 12-bit compiler for 12-bit PIC® MCUs.
PCM 14 Uses the 14-bit compiler for 14-bit PIC® MCUs.
PCH 16 Uses the 16-bit compiler for 16-bit PIC® MCUs.
PCD 24 Uses the 24-bit compiler for 16-bit PIC® MCUs and PIC® DSCs.

  1. Select Options -> Project Options from the ribbon along the top of the main window or from the menu bar if using the classic style IDE. In the Project Options window that appears, there are four different sections that allow for changes to be made to the compiler operation:

CCS IDE Project Options

Project Options
Options Purpose
General Allows source files to be added and removed from the current project.
Include Files Allows directories to be specified to search for header files needed for the project. By default, the CCS C Compiler directories for Devices and Drivers should appear in the list.
Global Defines Allows the creation of #define statements to be used during compiling.
Output Files Allows changes to the format and types of output files created during compilation.

  1. To compile the files in a project, select Compile from the ribbon along the top of the main window or from the menu bar if using the classic style IDE, and select one of the following options:

CCS IDE Compile Options

Compilation Options
Options Purpose
Build Compiles units that have changed since the last compilation and rebuilds the project.
Build and Run Performs a build and then programs the image to the microcontroller using the selected programming tool. The microcontroller then runs the new program.
Compile Compiles the current unit.
Rebuild Compiles all the units and builds the project.
Clean Deletes the output files for the project.

  1. After the program is compiled, a prompt will appear showing the types of files created and the amount of ROM and RAM used by the program. Press any key to close the window or it will auto-close after a certain amount of time has passed. The program can then be used for programming or debugging purposes.

CCS IDE Compile Complete


For additional help using the CCS C Compiler, contact CCS Technical Support.


C-Aware IDE Demo
Embedded C Learners Kit
EZ App Lynx