Chapter 2

Building From Sources

To build the dsPIC Helper Library, you need to have already installed the Microchip MPLAB C30 cross-compiler. You also need a basic Unix-like build environment with programs like Make and Sed. Under Windows I personally install and use Cygwin.

To build the dsPIC Helper Library, first unpack the source tree. You can do this with the following command:

  $ tar -xzf dspic-helper-1.0-src.tgz

Next, change directory to the head of the source tree that was just unpacked and run the make command:

  $ cd dspic-helper-1.0
  $ make

This should build the dsPIC Helper Library for the supported dsPIC microcontrollers. This includes the dsPIC30F6015, dsPIC30F6010A, and the dsPIC30F6010, though you can easily modify the Makefile to build for other targets as well.

2.1  Library Types

The build process actually builds two libraries for each microcontroller type; one for the default code size, and one using the -mlarge-code option. The libraries are built in separate directories named after the corresponding microcontroller and which option was enabled. For example, for the dsPIC30F6015, the libraries can be found here: