Hi Theblond (realname appreciated), > Here is the other command line: > >sdcc -mpic14 -p16f627 -c main.c > > >gplink -m -o firmware.hex main.o > message: using default linker script > "/home/pic/share/gputils/lkr/16f627.lkr" > error: missing definition for symbol "_PORTA", required by "main.o"
You need to link against the SDCC/pic14 device libraries as SDCC does as well: sdcc -mpic14 -p16f627 main.c -V tells you that sdcc links using gplink -w -r -o main main.o libsdcc.lib pic16f627.lib -w suppresses your warning (processor mismatch), -r allows to use shared banks (suppresses errors like no memory found for section foo_bar), libsdcc.lib provides helper routines for the backend (char/int/long arithmetics, pointer dereferencing, ...) and lib16f627 provides definitions for the SFRs (PORTA in your case). BTW: You might also try sdcc -mpic14 -p16f627 main.c other.o another.o which should build and link your project correctly (use -V to verify the linker's arguments and their order). Happy coding, 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