Hi,

>   I have been looking for a clue and I discovered (using the -V option 
>   of sdcc) that the pic18f452.lib is used by gpasm and gplink instead 
>   of pic18f4220.lib. I am unsure why this is used since I 'define' that 
>   I want to use a pic18f4220 as following:
> 
> #define __18f4220
> 
>   I am using the following command to compile my code:
> 
> sdcc -I ../lib -I ./ -I ../ -mpic16 --optimize-df --optimize-cmp \
> --optimize-goto --fstack --obanksel=2 -Wl -s../lib/linker.lkr -V main.c

Try
        sdcc -mpic16 -mpic18f4220 [more opts] main.c
instead, you need to specify which device you want to address on the
command line. You can then remove your define and
        #include <pic18fregs.h>
in your sources to generically include the correct device definitions.

Regards,
Raphael



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to