Frequently Asked Questions

Compiling a Program from an Existing File/Project

  1. Open the CCS PCW IDE and select Menu -> 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 PCW 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 PCW IDE Project Options

Project Options
Options Purpose
Files 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 PCW IDE Compile Options

Compilation Options
Options Purpose
Compile Compiles all the units in the current project or a single unit selected from the drop-down menu.
Build Compiles units that have changed since the last compilation and rebuilds the project.
Build All 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 PCW IDE Compile Complete


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