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.

TMS320F280045: F28004x Diagnostic STL TI-COFF problem

Part Number: TMS320F280045
Other Parts Discussed in Thread: C2000WARE

Hello.

I'm trying to link the F28004x Diagnostic STL from TI C2000Ware_4_0 in my TI-COFF project. The library is pre-compiled as ELF so I was trying to compile .asm sources in TI-COFF format. And I allways get following error at link time:

undefined first referenced
symbol in file
--------- ----------------
_STL_CPU_REG_testCPURegisters src/pal/pal_sr_lib.lib<pal_sdl.c.obj>
_STL_CPU_REG_testFPURegisters src/pal/pal_sr_lib.lib<pal_sdl.c.obj>
_STL_CPU_REG_testVCURegisters src/pal/pal_sr_lib.lib<pal_sdl.c.obj>

Also if I compile "f28004x_diagnostic_library" Project as COFF and than compile (also as COFF) example Project "f28004x_test_application" from C2000Ware_4_0. I get same error (See attached console log).

Do you have ASM sources of this library for TI-COFF or some other solution for my problem.

Best regards

console log.txt
**** Build of configuration RAM_RELEASE for project f28004x_test_application ****

"C:\\ti\\ccs1040\\ccs\\utils\\bin\\gmake" -k -j 4 all -O 
 
Building file: "../sta_comm.c"
Invoking: C2000 Compiler
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include" --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/examples/test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/include" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi --preproc_with_compile --preproc_dependency="sta_comm.d_raw"  "../sta_comm.c"
Finished building: "../sta_comm.c"
 
Building file: "../device.c"
Invoking: C2000 Compiler
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include" --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/examples/test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/include" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi --preproc_with_compile --preproc_dependency="device.d_raw"  "../device.c"
Finished building: "../device.c"
 
Building file: "../sta_main.c"
Invoking: C2000 Compiler
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include" --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/examples/test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/include" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi --preproc_with_compile --preproc_dependency="sta_main.d_raw"  "../sta_main.c"
Finished building: "../sta_main.c"
 
Building file: "../sta_tests.c"
Invoking: C2000 Compiler
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include" --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/examples/test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/include" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi --preproc_with_compile --preproc_dependency="sta_tests.d_raw"  "../sta_tests.c"
"C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include/stl_util.h", line 151 (col. 62): advice #2615-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division.
Finished building: "../sta_tests.c"
 
Building file: "../sta_user.c"
Invoking: C2000 Compiler
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include" --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/examples/test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/include" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi --preproc_with_compile --preproc_dependency="sta_user.d_raw"  "../sta_user.c"
Finished building: "../sta_user.c"
 
Building file: "../sta_timer.c"
Invoking: C2000 Compiler
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include" --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/examples/test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/include" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi --preproc_with_compile --preproc_dependency="sta_timer.d_raw"  "../sta_timer.c"
Finished building: "../sta_timer.c"
 
Building file: "../sta_util.c"
Invoking: C2000 Compiler
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/include" --include_path="C:/Users/StnG/Documents/sw_dev/ccs/workspaces/1/f28004x_test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/examples/test_application/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/device_support/f28004x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/include" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi --preproc_with_compile --preproc_dependency="sta_util.d_raw"  "../sta_util.c"
Finished building: "../sta_util.c"
 
Building target: "f28004x_test_application.out"
Invoking: C2000 Linker
"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -O4 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi -z -m"f28004x_test_application.map" --heap_size=0x200 --stack_size=0x300 --warn_sections -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/lib" -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c2000_21.6.0.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="f28004x_test_application_linkInfo.xml" --rom_model -o "f28004x_test_application.out" "./device.obj" "./sta_comm.obj" "./sta_main.obj" "./sta_tests.obj" "./sta_timer.obj" "./sta_user.obj" "./sta_util.obj" "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/calibration/hrpwm/f28004x/lib/SFO_v8_fpu_lib_build_c28_driverlib.lib" "C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f28004x/driverlib/ccs/Release/driverlib.lib" "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/diagnostic/f28004x/lib/f28004x_diagnostic_stl_release.lib" "../f28004x_sta_ram_lnk.cmd"  -llibc.a 
<Linking>
warning #10247-D: creating output section ".ebss" without a SECTIONS specification
warning #10247-D: creating output section ".econst" without a SECTIONS specification
 
 undefined                     first referenced
  symbol                           in file     
 ---------                     ----------------
 _STL_CPU_REG_testCPURegisters ./sta_tests.obj 
 _STL_CPU_REG_testFPURegisters ./sta_tests.obj 
 _STL_CPU_REG_testVCURegisters ./sta_tests.obj 
 _STL_CRC_calculate            <whole-program> 
 _STL_CRC_reset                <whole-program> 
 _STL_March_testRAM            <whole-program> 
 _STL_March_testRAMCopy        <whole-program> 
 
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "f28004x_test_application.out" not built
 
>> Compilation failure
makefile:150: recipe for target 'f28004x_test_application.out' failed
gmake[1]: *** [f28004x_test_application.out] Error 1
makefile:146: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

Gennadi

  • Have you tried adding the leading "_" to the function names in the asm files?

            .global _STL_March_testRAMCopy
            .global _STL_March_testRAM
    
            ...
    
    _STL_March_testRAMCopy:
    
            ...

    There's a COFF to EABI migration guide here. I'm not sure how well it works in reverse, but it may help you identify some of updates you'll need to make.

    Whitney