From: Raphael N. <rn...@we...> - 2007-04-30 15:03:54
|
Hi soliton, > Does anybody know or has reference on how to make lib and header for > certain PIC device, such as PIC16F887. If you have the SDCC sources at your disposal, try $ cd /path/to/sdcc/support/scripts $ mkdir build $ cd build $ ../inc2h.pl 16f886 /path/to/gputils $ ../inc2h.pl 16f887 /path/to/gputils # If /path/to/gputils/headers/p16f877.inc exists, you should obtain two # files: pic16f877.c and pic16f877.h. These only need to be copied into # the right places in device/lib/pic/libdev and device/lib/include/pic # respectively: $ cp pic1*.c /path/to/sdcc/device/lib/pic/libdev $ cp pic1*.h /path/to/sdcc/device/include/pic $ cd /path/to/sdcc/device/lib $ make model-pic14 $ make install > As I can see in the current release of SDCC, we still do not have > pic16f887.lib and pic16f877.h. pic16f877 is completely built, the 16f886 and 16f887 series are not yet supported by gputils without patches and thus broke our daily builds. You find the header files in device/include/pic, the device libraries reside in device/lib/pic/libdev/disabled_pic16f88[67].c. Just rename them to pic16f88[67] respectively and rebuild the library. Sorry for the inconvenience, gputils are to blame ;-) > Could I just modify the current pic16f877a.lib source and pic16f877a.h > since there are only little different between this device and newer > PIC16F887. Using the provided files should be easier---and safer. HTH, Raphael |