This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linking DSPLIB: Undefined symbol

Other Parts Discussed in Thread: OMAP3530

I am using DSPLink and its make system to build projects for the OMAP3530.

DSPLink and its sample applications run fine.

I installed DSPLIB version dsplib_c674x_3_1_0_0_Linux in order to integrate its C-callable functions into the DSP-side code. This is the problem I'm running into:


jhemilian@server:~/dspbios_dsplink/code/apps/dft/dsp$ make -s
[DFT                 ] ------- DIRS ------------------ INCLUDE ------------
[DFT                 ] ------- DIRS ------------------ DEBUG --------------
[DFT                 ] ------- DIRS ------------------ EXPORT -------------
[DFT                 ] ------- BLDINFO --------------- DEBUG --------------
[DFT                 ] ------- CLEAN ----------------- DEBUG --------------
[DFT                 ] ------- INCLUDES -----------------------------------
[DFT                 ] ------- OBJECT ---------------- DEBUG --------------
Compiling main.c...
Compiling tskDft.c...
Compiling dft_config.c...
Generating DSP/BIOS configuration files ...
Compiling dspcfg_c.c...
Compiling dspcfg.s62...
[DFT                 ] ------- TARGET ---------------- DEBUG --------------
Generating dft.out...
<Linking>

 undefined  first referenced
  symbol        in file
 ---------  ----------------
 _DSP_add32 /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/OBJ/DEBUG/tskDft.obj

error: unresolved symbols remain
error: errors encountered during linking;
   "/home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/BIN/DEBUG/dft.out" not built

>> Compilation failure
make[1]: *** [dft.out.deb] Error 1
make: *** [trgdeb] Error 2
jhemilian@server:~/dspbios_dsplink/code/apps/dft/dsp$


The routine I'm calling is DSP_add32.  I don't fully understand the linking process, so I do not know where the underscore (_) is being prepended.  I read on a different thread that a way to resolve it might be to add _DSP_add32 = DSP_add32 as an object alias to the cfg.cmd file.  The only problem is that it's a generated file, and I don't know where or how it's getting generated.

I am adding the /lib directory of DSPLIB to OSLIB_PLATFORM in c64xxp_5.xx_linux.mk, just as I added the /inc directory to OSINC_PLATFORM (and it compiles just fine).

Thanks for any help in advance.

  • John,

    Can you provide the linker command that you have used to create the final executable for us to examine how you have linked the DSPLIB with your application.

    There may be a simple way by which you might still be able to use DSP_add32 if that is the only function you wish to use from the library. The library is provided in complete source so you can copy the source file for the function from the library package and build it with your other source files if still have issues with linking the library.

    Regards,

    Rahul

  • Rahul,

    Thank you for your quick response.

    I have tried including DSPLIB source with my source per your suggestion, without external linking, and get the same exact error.  The output from build seems to be verbatim.

    Here was the command that was being called by Make before:

    Generating dft.out...
    /opt/ti-tools/c6000/cgtools/bin/cl6x -z -i/opt/ti-tools/bios/packages/ti/bios/lib -i/opt/ti-tools/c6000/cgtools/lib -i/opt/ti-tools/bios/packages/ti/rtdx/lib/c6000 -i/opt/ti-tools/bios/packages/ti/psl/lib -i/opt/ti-tools/dspbios_dsplib/lib  -c -q -x -o/home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/BIN/DEBUG/dft.out  /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/OBJ/DEBUG/dft_config.obj /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/OBJ/DEBUG/dspcfg_c.obj /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/OBJ/DEBUG/dspcfg.obj /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/OBJ/DEBUG/main.obj /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/OBJ/DEBUG/tskDft.obj   -l/home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplink.lib /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplinkpool.lib /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplinkmpcs.lib /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplinkmplist.lib /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplinkmsg.lib /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplinkdata.lib /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplinknotify.lib /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dsplinkringio.lib -m/home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/EXPORT/DEBUG/dft.map /home/jhemilian/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/BIOS_DEB/dspcfg.cmd
    <Linking>

     undefined  first referenced
      symbol        in file
     ---------  ----------------
     _DSP_add32 /home/jhemilian/napa/gumstix/dspbios_dsplink/source/dsplink/dsp/BUILD/OMAP3530_0/DFT/OBJ/DEBUG/tskDft.obj


  • I managed to just include it in my source and git it to run now (at first when I tried to, I forgot to add it to the SOURCES file as I had kept the function in separate file).  I only need a few functions from DSPLIB so this method should work just fine.  Thank you for your suggestion!

  • Thanks for the advice. I ends up just compiling the source files.

    I had no problem with IQmath or VLIB libraries in linking, but simply can't figure out how to deal with dsplib. 

    That's for DM8127 in RDK.