even with very simple code i get this message for:
sdcc -mpic14 -L /usr/share/sdcc/lib/pic/ --no-peep -p16f628 code.c
error: missing definition for symbol "__sdcc_gsinit_startup", required by "code.o"
what is wrong?
sdcc version (self compiled) from 08.03: SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.4 #4665 (Mar 9 2007) (UNIX)
_sdcc_gsinit_startup() is defined in device/lib/pic/libsdcc/idata.c, so you need to link against libsdcc.lib (which is done automatically if you let sdcc call the linker, i.e., if you do not use -S or -c).
Did you configure and build the pic14 library? Although this should have been done automatically, the process fails if gputils (gpasm, gplink, and gplib) are not in the $PATH while building SDCC.
cd $SDCC # wherever your SDCC/ChangeLog may reside
make install # copies libraries from ./build to ./bin
make install # installs libraries into $PREFIX/share/sdcc/lib/pic
Make sure, libsdcc.lib (from the pic(14) port) is available in the paths searched by gplink. You may use sdcc's command line option -V to find out, which paths are passed on to gplink (sdcc option -L<path> causes sdcc to call gplink with gplink option -I<path>). If the correct path to libsdcc.lib is missing, just add it to the sdcc command line. I usually build my stuff referencing the libs in the sdcc source tree using
sdcc -mpic14 -p16f877 -I$SDCC/device/include/pic -I$SDCC/device/include -L$SDCC/device/lib/pic/bin -Wl,-m -Wa,-I$GPUTILS/header something.c
where $SDCC points to my sdcc root and $GPUTILS points to my gputils base directories.
i did installed gputils, build the libraries, and corrected the path, and it works!
Thank you very much for your help!
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.