Next: 4.6.9 Adding New Devices Up: 4.6 The PIC16 port Previous: 4.6.7 Header Files Contents Index
Subsections

- Building the libraries

## 4.6.8 Libraries

The libraries that PIC16 port depends on are the microcontroller device libraries which contain the symbol definitions for the microcontroller special function registers. These libraries have the format pic18fxxxx.lib, where xxxx is the microcontroller identification number. The specific library is selected automatically by the compiler at link stage according to the selected device.

Libraries are created with gplib which is part of the gputils package http://sourceforge.net/projects/gputils.

### Building the libraries

Before using SDCC/pic16 there are some libraries that need to be compiled. This process is not done automatically by SDCC since not all users use SDCC for pic16 projects. So each user should compile the libraries separately.

The steps to compile the pic16 libraries under Linux and Mac OS X are:

  cd device/lib/pic16

  ./configure

  make

  cd ..

  make model-pic16

  su -c 'make install' # install the libraries, you need the root password

If you need to install the headers too, do:

  cd device/include

  su -c 'make install' # install the headers, you need the root password

There exist a special target to build the I/O libraries. This target is not automatically build because it will build the I/O library for every supported device. This way building will take quite a lot of time. Users are advised to edit the device/lib/pic16/pics.build file and then execute:

  make lib-io

Next: 4.6.9 Adding New Devices Up: 4.6 The PIC16 port Previous: 4.6.7 Header Files Contents Index