Next: 4.5.3 Interrupt Code
Up: 4.5 The PIC14 port
Previous: 4.5.1 PIC Code Pages
Contents
Index
Adding support for a new 14bit PIC MCU requires the following steps:
- Create a new device description.
Each device is described in two files: pic16f*.h and pic16f*.c.
These files primarily define SFRs, structs to access their bits, and
symbolic configuration options. Both files can be generated from gputils'
.inc files using the perl script support/scripts/inc2h.pl.
This file also contains further instructions on how to proceed.
- Copy the .h file into SDCC's include path and either add the .c file
to your project or copy it to device/lib/pic/libdev. Afterwards,
rebuild and install the libraries.
- Edit pic14devices.txt in SDCC's include path (device/include/pic/
in the source tree or /usr/local/share/sdcc/include/pic after
installation).
You need to add a device specification here to make the memory layout
(code banks, RAM, aliased memory regions, ...) known to the compiler.
Probably you can copy and modify an existing entry. The file format
is documented at the top of the file.
Next: 4.5.3 Interrupt Code
Up: 4.5 The PIC14 port
Previous: 4.5.1 PIC Code Pages
Contents
Index
2008-12-05