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.

TMS320F280037: C2000 linker not finding lib which it has a path to

Part Number: TMS320F280037
Other Parts Discussed in Thread: SFRA

Tool/software:

I am trying to setup a pipeline build on Bitbucket.  I have version 22.6.2 of the C2000 compiler installed along with 20.1.1 of CCS on Ubuntu 20.04.  I am using the ccs-server-cli.sh to 1) import the existing project into a workspace, 2) build all projects found in the workspace. 

I kick off the build with:

/opt/ti/ccs/eclipse/ccs-server-cli.sh -workspace "$BITBUCKET_CLONE_DIR/workspace" -application projectBuild -ccs.workspace

The compilation completes without issue, but I am getting an error during linking about a lib sfra_f32_tmu_eabi.lib not being found, even though it is on disk at the location provided to the linker.  Below is the output of the C2000 during linking with the supplied library path for the lib in question highlighted yellow:

Building target: "DBG-FW-PWR-v1.1.22.out"
Invoking: C2000 Linker
"/opt/ti/ti-cgt-c2000_22.6.2.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --tmu_support=tmu1 --vcu_support=vcrc -O0 --opt_for_speed=5 --fp_mode=relaxed --advice:performance=all --define=USER_VERSION_MAJOR=1 --define=USER_VERSION_MINOR=1 --define=USER_VERSION_PATCH=22 --define=BRAKE_PWM_N --define=EM_BRAKE_TEST_N --define=EEPROM_I2C_N --define=BENCHTEST_N --define=MOTOR1_TC_N --define=NO_TRIP_ZONES_N --define=_INLINE --define=_FLASH --define=_F28003x --define=TYPHOON_HIL_N --define=_FULL_FAST_LIB --define=_PMSM_FAST_LIB_N --define=MOTOR1_FAST --define=MOTOR1_RPM_CMD --define=MOTOR1_ESMO_N --define=MOTOR1_ENC_N --define=MOTOR1_HALL_N --define=HALL_CAL_N --define=MOTOR1_OVM_N --define=MOTOR1_FWC --define=MOTOR1_MTPA_N --define=MOTOR1_SSIPD_N --define=MOTOR1_VOLRECT_N --define=EPWMDAC_MODE --define=DATALOGF4_EN_N --define=DAC128S_ENABLE_N --define=DAC128S_SPIB_N --define=CPUTIME_ENABLE_N --define=TEST_ENABLE_N --define=SFRA_ENABLE_N --define=STEP_RP_EN_N --define=CMD_POT_EN_N --define=CMD_CAP_EN_N --define=CMD_SWITCH_EN_N --define=CMD_CAN_EN_N --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"DBG-FW-PWR-v1.1.22.map" --stack_size=0x100 --warn_sections -i"/opt/ti/ti-cgt-c2000_22.6.2.LTS/lib" -i"/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/FlashAPI/lib" -i"/opt/atlassian/pipelines/agent/build/workspace/MotorControlSDK/libraries/sfra" -i"/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/observers/est_lib" -i"/opt/ti/ti-cgt-c2000_22.6.2.LTS/include" --reread_libs --define=SFRA_ENABLE_N --diag_wrap=off --display_error_number --xml_link_info="inv-mh_linkInfo.xml" --entry_point=code_start --rom_model -o "DBG-FW-PWR-v1.1.22.out" "./sys_main.obj" "./libraries/control/dclink_ss/dclink_ss.obj" "./libraries/control/fwc/fwc.obj" "./libraries/control/mtpa/mtpa.obj" "./libraries/control/pi/pi.obj" "./libraries/control/vs_freq/vs_freq.obj" "./libraries/filter/filter_fo/filter_fo.obj" "./libraries/observers/encoder/encoder.obj" "./libraries/observers/esmo/esmo.obj" "./libraries/observers/hall/hall.obj" "./libraries/observers/isbldc/isbldc.obj" "./libraries/observers/speedcalc/speedcalc.obj" "./libraries/observers/speedfr/speedfr.obj" "./libraries/observers/ssipd/ssipd.obj" "./libraries/sfra/sfra_gui_scicomms_driverlib.obj" "./libraries/transforms/clarke/clarke.obj" "./libraries/transforms/iclarke/iclarke.obj" "./libraries/transforms/ipark/ipark.obj" "./libraries/transforms/park/park.obj" "./libraries/transforms/svgen/svgen.obj" "./libraries/transforms/svgen/svgen_current.obj" "./libraries/transforms/volts/volt_recons.obj" "./libraries/utilities/angle_gen/angle_gen.obj" "./libraries/utilities/cpu_time/cpu_time.obj" "./libraries/utilities/datalog/datalogIF.obj" "./libraries/utilities/mod6cnt/mod6cnt.obj" "./libraries/utilities/rimpulse/rimpulse.obj" "./libraries/utilities/step_response/step_response.obj" "./libraries/utilities/traj/traj.obj" "./spi_DMA/spiDmaFunctions.obj" "./spi_DMA/spi_DMA.obj" "./src_board/crc16.obj" "./src_board/hal.obj" "./src_board/user_mtr1.obj" "./src_control/communication.obj" "./src_control/motor1_drive.obj" "./src_control/motor_common.obj" "./src_device/device.obj" "./src_device/f28003x_codestartbranch.obj" "./src_device/f28003x_globalvariabledefs.obj" "./src_device/driverlib/adc.obj" "./src_device/driverlib/aes.obj" "./src_device/driverlib/asysctl.obj" "./src_device/driverlib/bgcrc.obj" "./src_device/driverlib/can.obj" "./src_device/driverlib/cla.obj" "./src_device/driverlib/clb.obj" "./src_device/driverlib/cmpss.obj" "./src_device/driverlib/cputimer.obj" "./src_device/driverlib/dac.obj" "./src_device/driverlib/dcc.obj" "./src_device/driverlib/dcsm.obj" "./src_device/driverlib/dma.obj" "./src_device/driverlib/ecap.obj" "./src_device/driverlib/epg.obj" "./src_device/driverlib/epwm.obj" "./src_device/driverlib/eqep.obj" "./src_device/driverlib/erad.obj" "./src_device/driverlib/flash.obj" "./src_device/driverlib/fsi.obj" "./src_device/driverlib/gpio.obj" "./src_device/driverlib/hic.obj" "./src_device/driverlib/hrcap.obj" "./src_device/driverlib/hrpwm.obj" "./src_device/driverlib/i2c.obj" "./src_device/driverlib/interrupt.obj" "./src_device/driverlib/lin.obj" "./src_device/driverlib/mcan.obj" "./src_device/driverlib/memcfg.obj" "./src_device/driverlib/pmbus.obj" "./src_device/driverlib/sci.obj" "./src_device/driverlib/sdfm.obj" "./src_device/driverlib/spi.obj" "./src_device/driverlib/sysctl.obj" "./src_device/driverlib/version.obj" "./src_device/driverlib/xbar.obj" "../f280037_flash_80000.cmd" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/FlashAPI/lib/FAPI_F28003x_EABI_v1.58.10.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/observers/est_lib/fast_full_lib.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/observers/est_lib/fast_full_lib_eabi.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/observers/est_lib/fast_pmsm_lib.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/observers/est_lib/fast_pmsm_lib_eabi.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/observers/est_lib/fast_simple_lib.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/observers/est_lib/fast_simple_lib_eabi.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/sfra/sfra_f32_tmu_eabi.lib" "/opt/atlassian/pipelines/agent/build/MotorControlSDK/src_device/f28003x_headers_nonbios.cmd" -lfast_full_lib.lib -lsfra_f32_tmu_eabi.lib -llibc.a
<Linking>
error #10008-D: cannot find file "sfra_f32_tmu_eabi.lib"
error #10010: errors encountered during linking; "DBG-FW-PWR-v1.1.22.out" not built

But the file is present at the specified location as verified with the find command just prior to building:

find $BITBUCKET_CLONE_DIR -type f -name sfra_f32_tmu_eabi.lib
/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/sfra/sfra_f32_tmu_eabi.lib

Thank you for your assistance,

Jeremy

  • The following isolates the SFRA related entries in the linker command ...

    -i"/opt/atlassian/pipelines/agent/build/workspace/MotorControlSDK/libraries/sfra"
    "/opt/atlassian/pipelines/agent/build/MotorControlSDK/libraries/sfra/sfra_f32_tmu_eabi.lib"
    -lsfra_f32_tmu_eabi.lib

    It appears that workspace in the first entry should be removed.

    This next part is related, but different ... I don't understand why you specify the library sfra_f32_tmu_eabi.lib two times.  Once is enough.

    Thanks and regards,

    -George

  • Sorry, I think I see my own error - I have 'workspace' in the path passed to the linker, it should not be there.  I missed that the first few times I looked it over.

  • Yes, workspace is incorrect and results from the .cproject file using back-slashes instead of forward-slashes, which creates an issue on the Ubuntu pipeline.  Got it working now, thank you for looking into this.