__sdcc_gsinit_startup missing

rudolf
2007-03-13
2013-03-12
  • rudolf

    rudolf - 2007-03-13

    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)

    thanks,
    ludefu

     
    • Raphael Neider

      Raphael Neider - 2007-03-13

      _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
      cd device/lib/pic
      ./configure
      make -s
      make install # copies libraries from ./build to ./bin
      cd ..
      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.

      Regards,
      Raphael

       
    • rudolf

      rudolf - 2007-03-13

      Thats it!

      i did installed gputils, build the libraries, and corrected the path, and it works!
      Thank you very much for your help!

      rudolf

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks