On Thu, 2007-01-18 at 08:57 +0100, Raphael Neider wrote: > > #define __18f4220 > > Try > sdcc -mpic16 -mpic18f4220 [more opts] main.c > instead, you need to specify which device you want to address on the > command line.
I tried the following: sdcc -mpic16 -mpic18f4220 -I ../lib -I ./ -I ../ --optimize-df --optimize-cmp --optimize-goto --fstack --obanksel=2 -Wl -s../lib/linker.lkr -V main.c And removed the #define __18f4220 but it seems to me that the still pic18f452.lib is used instead of pic18f4220.lib when reading the output of the command: + "/usr/bin/sdcpp" -nostdinc -Wall -std=c99 -I"../lib" -I"./" -I"../" -Dpic18f452 -D__18f452 -DSTACK_MODEL_SMALL -obj-ext=.o -DSDCC_MODEL_SMALL -DSDCC=260 -DSDCC_pic16 -D__pic16 -I"/usr/bin/../share/sdcc/include/pic16" -I"/usr/share/sdcc/include/pic16" -I"../lib" -I"./" -I"../" "main.c" + "/usr/bin/gpasm" -DSDCC_MODEL_SMALL -Dpic18f452 -D__18F452 -DSTACK_MODEL_SMALL -c "main.asm" -o "main.o" + "/usr/bin/gplink" -I"/usr/bin/../share/sdcc/lib/pic16" -I"/usr/share/sdcc/lib/pic16" -s../lib/linker.lkr -o main main.o crt0i.o pic18f452.lib libsdcc.lib error: missing definition for symbol "_ADCON2", required by "main.o" Maarten ------------------------------------------------------------------------- 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