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.

TMS320F28379D: Delfino Endat lib issue linking

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Hello, 

I am trying to link the endat 2.2 libs into my system which uses the driverlib extensions.

First, for test, I 

#include "PM_endat22_Include.h"

where I use the original location just for test C:\ti\controlSUITE\libs\app_libs\position_manager\v01_02_00_00\endat22\Float\include

and I include library file pm_endat22_lib.lib

again from the controlsuite location

I get an error due to void IDLE(); in F2837xD_SysCtrl.c (which I think is because PM_endat22_Include.h includes F28x_Project.h) and F2837xD_SysCtrlis not part of driverlib, it is part of obsolete device_support.

Next I moved PM_endat22_Include.h and PM_endat22_lib.lib to my local project and adjusted PM_endat22_Include.h

I commented out //#include "F28x_Project.h" and added #include "driverlib.h"

In my source, I use some function calls PM_endat22_generateCRCTable() PM_endat22_setupPeriph() PM_endat22_setFreq() and I get unresolved symbol errors now. 

console output shows -lpm_endat22_lib.lib  so I think it is being linked correctly.

This project is linked in legacy Coff.

So I am not sure why I cannot link the lib functions. Anyone have any ideas?

  • One thing I also do not see PM_endat22_lib.lib listed in the .map file even though my library search path appears correct,   I include the library file and I see in link command string console output the -l option mentioned above

  • are there any additional flags I can turn on to see why the library chosen is not linking into the project?


  • Building target: "StandardPMMotorCPU1.out"
    Invoking: C2000 Linker
    "C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --advice:performance=all --define=CPU1 --define=OEM_STANDARD --define=PM --define=DEBUG -g --cpp_default --diag_suppress=2825 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi -z -m"StandardPMMotorCPU1.map" --stack_size=0x200 --warn_sections -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/lib" -i"C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/include" -i"C:/ti/c2000/C2000Ware_3_03_00_00/libraries/dsp/VCU/c28/lib" --reread_libs --diag_wrap=off --display_error_number --verbose_diagnostics --xml_link_info="StandardPMMotorCPU1_linkInfo.xml" --rom_model -o "StandardPMMotorCPU1.out" "./Config.obj" "./MotorCPU1/HAL/I2C_MS.obj" "./MotorCPU1/HAL/IPC.obj" "./MotorCPU1/HAL/logic_in.obj" "./MotorCPU1/HAL/watchdog.obj" "./MotorCPU1/HAL/SPI/Line_DSP_Device.obj" "./MotorCPU1/HAL/SPI/SPI_Device.obj" "./MotorCPU1/HAL/SPI/SPI_Master.obj" "./MotorCPU1/HAL/SPI/SPI_Super.obj" "./MotorCPU1/HAL/SPI/iC_Haus_TW8_Device.obj" "./MotorCPU1/Math/filters.obj" "./MotorCPU1/OEM/Standard/dcu/Serial_Handler/Serial_Alarm_ID_Map.obj" "./MotorCPU1/OEM/Standard/dcu/Serial_Handler/Serial_Fault_ID_Map.obj" "./MotorCPU1/OEM/Standard/dcu/Serial_Handler/Serial_Var_ID_Map.obj" "./MotorCPU1/OEM/Standard/globals.obj" "./MotorCPU1/PCU/PM/Endat_Abs_Encoder.obj" "./MotorCPU1/PCU/PM/Endat_Ichaus_Sincos.obj" "./MotorCPU1/PCU/PM/PCU_Encoder.obj" "./MotorCPU1/PCU/pcu_carrier.obj" "./syscfg/board.obj" "./MotorCPU1/device.obj" "./MotorCPU1/globalvars.obj" "./MotorCPU1/main.obj" "./MotorCPU1/dcu/DCU_2ms_Handler.obj" "./MotorCPU1/dcu/DCU_Num_Scale.obj" "./MotorCPU1/dcu/Supervisor_IPC.obj" "./MotorCPU1/dcu/dcu_2ms.obj" "./MotorCPU1/dcu/dcu_antirollback.obj" "./MotorCPU1/dcu/dcu_logic_in_parse.obj" "./MotorCPU1/dcu/dcu_speed_fdbk.obj" "./MotorCPU1/dcu/dcu_speed_ref.obj" "./MotorCPU1/dcu/dcu_speed_reg.obj" "./MotorCPU1/dcu/inverter_logic.obj" "./MotorCPU1/dcu/inverter_temp.obj" "./MotorCPU1/dcu/PM/Inverter_Fault.obj" "./MotorCPU1/dcu/PM/Motor_Num_Scale.obj" "./MotorCPU1/dcu/PM/dcu_logic_out.obj" "./MotorCPU1/dcu/Parameter_Change_Handler/Parameter_Change_Handler.obj" "./MotorCPU1/dcu/Parameter_Change_Handler/Read_Handler.obj" "./MotorCPU1/dcu/Parameter_Change_Handler/Supervisor_Update_Handler.obj" "./MotorCPU1/dcu/Parameter_Change_Handler/Sync_Handler.obj" "./MotorCPU1/dcu/Parameter_Change_Handler/Write_Handler.obj" "./MotorCPU1/dcu/Serial_Handler/Mode_1/Mode_1.obj" "./MotorCPU1/dcu/Serial_Handler/Protocol.obj" "./MotorCPU1/dcu/Serial_Handler/Serial_Handler.obj" "./MotorCPU1/serial/serial_debugger.obj" "C:/q3/Q3/Source/Motor/MotorCPU1/2837x_RAM_lnk_cpu1.cmd" -l"C:/ti/c2000/C2000Ware_3_03_00_00/driverlib/f2837xd/driverlib/ccs/Debug/driverlib.lib" -l"C:/ti/c2000/C2000Ware_3_03_00_00/device_support/f2837xd/headers/cmd/F2837xD_Headers_nonBIOS_cpu2.cmd" -l"C:/ti/c2000/C2000Ware_3_03_00_00/libraries/math/FPUfastRTS/c28/lib/rts2800_fpu32_fast_supplement.lib" -l"C:/q3/Q3/Source/common/Q3/Release/Common.lib" -l"C:/q3/Q3/Source/pm_endat22_lib/Debug/pm_endat22_lib.lib" -lc28x_vcu2_library_fpu32.lib -lrts2800_fpu32.lib
    <Linking>
    warning #10247-D: creating output section "FPUmathTables" without a SECTIONS specification
    warning #10210-D: creating ".esysmem" section with default size of 0x400; use the -heap option to change the default size

    undefined first referenced
    symbol in file
    --------- ----------------
    PM_endat22_generateCRCTable(unsigned int, unsigned int, unsigned int *) ./MotorCPU1/PCU/PM/Endat_Abs_Encoder.obj
    PM_endat22_setFreq(unsigned long) ./MotorCPU1/PCU/PM/Endat_Abs_Encoder.obj
    PM_endat22_setupPeriph() ./MotorCPU1/PCU/PM/Endat_Abs_Encoder.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "StandardPMMotorCPU1.out" not built

    >> Compilation failure
    makefile:225: recipe for target 'StandardPMMotorCPU1.out' failed
    gmake[1]: *** [StandardPMMotorCPU1.out] Error 1
    makefile:216: recipe for target 'all' failed
    gmake: *** [all] Error 2

    **** Build Finished ****

  • John,

    First, an apology for the delay in replying.  I was on vacation last week when the assignment came in and we failed to alert you alert you to the delay. 

    One thing I also do not see PM_endat22_lib.lib listed in the .map file even though my library search path appears correct,
    -l"C:/q3/Q3/Source/pm_endat22_lib/Debug/pm_endat22_lib.lib
    undefined first referenced
    symbol in file
    --------- ----------------
    PM_endat22_generateCRCTable(unsigned int, unsigned int, unsigned int *) ./MotorCPU1/PCU/PM/Endat_Abs_Encoder.obj
    PM_endat22_setFreq(unsigned long) ./MotorCPU1/PCU/PM/Endat_Abs_Encoder.obj
    PM_endat22_setupPeriph() ./MotorCPU1/PCU/PM/Endat_Abs_Encoder.obj

    The undefined reference list indicates that the functions were not found but as you mentioned you have a path setup to access the library.  I would double check everything - i.e. the spelling/name of the library, chaptalization and the path location on your system.  Windows shouldn't care that pm was used instead of PM - if you are on Linux this will matter (unless you renamed the .lib file). 

    -Lori

  • what I found was that we had a button checked for treat C files as c++ files, which the library did not. Once I got that straight it linked in the lib. Thanks!