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.

TMS320F28388D: How to fix Linking error while working with SGEN Module

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi,

I'm working on TMS320F28388D. I'm trying to generate 3 phase sine wave using SGEN module, I have added the needed .asm files in the project folder, and I have included the lib files also from this location ( C:\ti\c2000\C2000Ware_4_01_00_00\archive\libraries\dsp\SGEN\c28\lib ).

But I'm getting error as undefined symbol. Is there any way to fix this error?

**** Build of configuration CPU1_RAM for project buffdac_ex3_waveform_new ****

"C:\\ti\\ccs1010\\ccs\\utils\\bin\\gmake" -k -j 8 all -O 
 
Building file: "../buffdac_ex3_waveform.syscfg"
Invoking: SysConfig
"C:/ti/ccs1010/ccs/utils/sysconfig_1.5.0/sysconfig_cli.bat" -d "F2838x" -s "C:/ti/c2000/C2000Ware_4_01_00_00/.metadata/sdk.json" -o "syscfg" --package 337bga --part F2838x_337bga "../buffdac_ex3_waveform.syscfg"
Running script...
Validating...
Generating Code (buffdac_ex3_waveform.syscfg)...
Writing C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2838x\examples\c28x\led\buffdac_ex3_waveform_new\CPU1_RAM\syscfg\board.c...
Writing C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2838x\examples\c28x\led\buffdac_ex3_waveform_new\CPU1_RAM\syscfg\board.h...
Writing C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2838x\examples\c28x\led\buffdac_ex3_waveform_new\CPU1_RAM\syscfg\pinmux.csv...
Writing C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2838x\examples\c28x\led\buffdac_ex3_waveform_new\CPU1_RAM\syscfg\c2000ware_libraries.cmd.genlibs...
Writing C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2838x\examples\c28x\led\buffdac_ex3_waveform_new\CPU1_RAM\syscfg\c2000ware_libraries.opt...
Writing C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2838x\examples\c28x\led\buffdac_ex3_waveform_new\CPU1_RAM\syscfg\c2000ware_libraries.c...
Writing C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f2838x\examples\c28x\led\buffdac_ex3_waveform_new\CPU1_RAM\syscfg\c2000ware_libraries.h...
Finished building: "../buffdac_ex3_waveform.syscfg"
 
Building file: "../SINTB360.asm"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="SINTB360.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --cmd_file="syscfg/c2000ware_libraries.opt"  "../SINTB360.asm"
Finished building: "../SINTB360.asm"
 
Building file: "../sgti1c.asm"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="sgti1c.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --cmd_file="syscfg/c2000ware_libraries.opt"  "../sgti1c.asm"
Finished building: "../sgti1c.asm"
 
Building file: "../sgti3c.asm"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="sgti3c.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --cmd_file="syscfg/c2000ware_libraries.opt"  "../sgti3c.asm"
Finished building: "../sgti3c.asm"
 
Building file: "../device/f2838x_codestartbranch.asm"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="device/f2838x_codestartbranch.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --obj_directory="device" --cmd_file="syscfg/c2000ware_libraries.opt"  "../device/f2838x_codestartbranch.asm"
Finished building: "../device/f2838x_codestartbranch.asm"
 
Building file: "syscfg/board.c"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="syscfg/board.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --obj_directory="syscfg" --cmd_file="syscfg/c2000ware_libraries.opt"  "syscfg/board.c"
Finished building: "syscfg/board.c"
 
Building file: "syscfg/c2000ware_libraries.c"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="syscfg/c2000ware_libraries.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --obj_directory="syscfg" --cmd_file="syscfg/c2000ware_libraries.opt"  "syscfg/c2000ware_libraries.c"
Finished building: "syscfg/c2000ware_libraries.c"
 
Building file: "../device/device.c"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="device/device.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --obj_directory="device" --cmd_file="syscfg/c2000ware_libraries.opt"  "../device/device.c"
Finished building: "../device/device.c"
 
Building file: "../buffdac_ex3_waveform.c"
Invoking: C2000 Compiler
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/lib" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/archive/libraries/dsp/SGEN/c28/include" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/device" --include_path="C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib" --include_path="C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="buffdac_ex3_waveform.d_raw" --include_path="C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" --cmd_file="syscfg/c2000ware_libraries.opt"  "../buffdac_ex3_waveform.c"
"../buffdac_ex3_waveform.c", line 999: warning #9-D: nested comment is not allowed
"../buffdac_ex3_waveform.c", line 1254 (col. 38): advice #2614-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division.
Finished building: "../buffdac_ex3_waveform.c"
 
Building target: "buffdac_ex3_waveform_new.out"
Invoking: C2000 Linker
"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --idiv_support=idiv0 --tmu_support=tmu0 -Ooff --define=RAM --define=DEBUG --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"buffdac_ex3_waveform_new.map" --heap_size=0x200 --stack_size=0x3F8 --warn_sections -i"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/lib" -i"C:/ti/c2000/C2000Ware_4_01_00_00" -i"C:/ti/c2000/C2000Ware_4_02_00_00/driverlib/f2838x/examples/c28x/led/buffdac_ex3_waveform_new/CPU1_RAM/syscfg" -i"C:/ti/CCS10.1.0.00010_win64/ti-cgt-c2000_21.6.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="buffdac_ex3_waveform_new_linkInfo.xml" --entry_point=code_start --rom_model -o "buffdac_ex3_waveform_new.out" "./SINTB360.obj" "./buffdac_ex3_waveform.obj" "./syscfg/board.obj" "./syscfg/c2000ware_libraries.obj" "./sgti1c.obj" "./sgti3c.obj" "./device/device.obj" "./device/f2838x_codestartbranch.obj" "../2838x_RAM_lnk_cpu1.cmd" "C:/ti/c2000/C2000Ware_4_01_00_00/driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib"  -llibc.a 
<Linking>
warning #10247-D: creating output section "DLOG" without a SECTIONS specification
warning #10229-D: output section ".data" refers to load symbol "SGENTI_3_calc" and hence cannot be compressed; compression "lzss" is ignored
 
 undefined     first referenced          
  symbol           in file               
 ---------     ----------------          
 SGENTI_3_calc ./buffdac_ex3_waveform.obj
 
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "buffdac_ex3_waveform_new.out" not built
 
>> Compilation failure
makefile:151: recipe for target 'buffdac_ex3_waveform_new.out' failed
makefile:147: recipe for target 'all' failed
gmake[1]: *** [buffdac_ex3_waveform_new.out] Error 1
gmake: *** [all] Error 2

**** Build Finished ****

Regards,

KANAGAPRIYA P.

  • Hi,

    How are you invoking this asm function from the C File?  

    Pls share details about it.

    Best Regards

    Siddharth

  • For the sgen module which I'm using the function structure is in header file that will generate a sine wave , it has some structure members for which we will assign some values using macro. In that macro we have function declaration. But the definition of that function is in .asm file. In C file, we will create one instance for that struct and we will call inside the ISR function. 

    Struct  and macro:

    typedef struct {
    unsigned int freq;
    unsigned int step_max;
    unsigned int alpha;
    int gain;
    int offset;
    int out1;
    int out2;
    int out3;
    void (*calc)(void *);
    }SGENTI_3;

    #define SGENTI_3_DEFAULTS { 5369,\
    1000,\
    0,\
    0x7fff,\
    0,\
    0,\
    0,\
    0,\
    (void (*)(void *))SGENTI_3_calc}

    In c file :

    SGENTI_3 sgen = SGENTI_3_DEFAULTS;

    Function call in ISR function :

    sgen.calc(&sgen);

    And I have noticed one thing, in the example code they have called the .asm file there the function definition is in the same name , here it is starting with underscore.( _SGENTI_3_calc )

  • Hi, 

    I think that the issue is due to incorrect output format in the compiler options.  It should be legacy COFF instead to EABI. 

    The SGEN library was developed using an older version of the compiler (6.0.1) which does not support EABI format.  Can you change the ouput format and try to compile your code? 

    Best Regards

    Siddharth

  • Hii,

    I have changed the output format but still I'm getting so many errors. And I have tried editing the .asm file, I have removed the underscore in the function definition ( _SGENTI_3_calc ) and its working now. Thank you for your valuable time !

    Regards,

    KANAGAPRIYA P