Hi,

> When trying to compile
> 
>     $ cd /path/to/sdcc/device/lib
>     $ make model-pic14
>     $ make install
> 
> I got following error message when it compile pic16f886.c and 16f887c.
> blabla
> ...
> [  CC   ] ==> pic16f886.o
> '16f886' was not found.
> Is it sdcc which could not found '16f886' and '16f887'  or the problem 
> lies on gpasm. But gpasm -l already show the 16f886 and 16f887.

SDCC cannot find the device specification for 16f88[67]. SDCC requires 
three files per device:
(1) pic16f*.lib - compiled and gplib'ed from pic16f*.c
(2) pic16f*.h - not strictly required, but usually included via
        #include <pic14regs.h>
(3) pic14devices.txt - a text file specifying the memory layout and
     stuff for each device

(3) is expected in one of SDCC's -I search paths. Probably you have 
installed an older version of SDCC and *not* overwritten the old 
pic14devices.txt (possibly somewhere in 
/usr/share/sdcc/include/pic/pic14devices.txt, locate is your friend). 
pic14devices.txt was augmented to provide 16f88[67] on April 23rd, 
r4768. Any earlier revision of pic14devices.txt in the search path will 
corrupt your build. Try adding -I /path/to/sdcc/device/include/pic to 
your command line to force sdcc to look in the right place early.

Or you patch the installed file: Just add <code>
processor 16f886
         program         8K
         data            368
         eeprom          256
         io              24
         maxram          0x1ff
         bankmsk         0x180
         confsiz         2
         regmap          0x180 0x00 0x02 0x03 0x04 0x0a 0x0b
         regmap          0x100 0x01 0x81 0x06 0x86
         memmap          0x0020 0x006f 0x000
         memmap          0x0070 0x007f 0x180
         memmap          0x00a0 0x00ef 0x000
         memmap          0x0110 0x016f 0x000
         memmap          0x0190 0x01ef 0x000

processor 16f887
         program         8K
         data            368
         eeprom          256
         io              35
         maxram          0x1ff
         bankmsk         0x180
         confsiz         2
         regmap          0x180 0x00 0x02 0x03 0x04 0x0a 0x0b
         regmap          0x100 0x01 0x81 0x06 0x86
         memmap          0x0020 0x006f 0x000
         memmap          0x0070 0x007f 0x180
         memmap          0x00a0 0x00ef 0x000
         memmap          0x0110 0x016f 0x000
         memmap          0x0190 0x01ef 0x000
</code>
somewhere and off you (should) go.

HTH,
Raphael


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to