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.

Compiler/AM6548: ETH-CAN gateway demo build errors

Part Number: AM6548
Other Parts Discussed in Thread: TMDX654IDKEVM

Tool/software: TI C/C++ Compiler

Hi all,

I am attempting build the CAN-ETH gateway example from CCS by creating a project and importing the source and build files. The project will be tested on the TMDX654IDKEVM, and the purpose is to get it running from CCS to make development of this simpler. At the moment I am quite stuck and was hoping someone could provide some assistance to make this work.

The following 2 error codes I am finding trouble resolving:

1) symbol "Osal_free" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj" null: symbol "Osal_free" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"

2) unresolved symbol Board_init, first referenced in ./gateway_main.obj gatewayapp

There are plenty other errors as well as expected, but all are of the same for as the abovementioned. See the text file of the Console Build Log: 

**** Build of configuration Debug for project gatewayapp ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -O 
 
Building target: "gatewayapp.out"
Invoking: ARM Linker
"C:/ti/ti-cgt-arm_18.1.5.LTS/bin/armcl" --code_state=32 --define=SOC_AM65XX -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"gatewayapp.map" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/osal/lib/tirtos/am65xx/r5f/release" -i"C:/ti/ti-cgt-arm_18.1.5.LTS/lib" -i"C:/ti/ti-cgt-arm_18.1.5.LTS/include" --priority --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="gatewayapp_linkInfo.xml" --rom_model -o "gatewayapp.out" "./gateway_app.obj" "./gateway_main.obj" "./gateway_osal.obj" "./network_api.obj" "./utils_prf.obj" "../linker_r5.lds" -l"configPkg/linker.cmd" -llibc.a 
<Linking>
error #10056: symbol "Osal_TaskCreate" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
error #10056: symbol "Osal_malloc" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
error #10056: symbol "Osal_free" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
error #10056: symbol "Osal_TaskCreate_v2" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
error #10056: symbol "Osal_TaskSleep" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
 
 undefined                 first referenced  
  symbol                       in file       
 ---------                 ----------------  
 Board_init                ./gateway_main.obj
 EMAC_socGetInitCfg        ./gateway_main.obj
 EMAC_socSetInitCfg        ./gateway_main.obj
 HwiP_Params_init          ./gateway_app.obj 
 HwiP_clearInterrupt       ./gateway_app.obj 
 HwiP_create               ./gateway_app.obj 
 HwiP_disable              ./utils_prf.obj   
 HwiP_restore              ./utils_prf.obj   
 MCAN_addStdMsgIDFilter    ./gateway_app.obj 
 MCAN_clearIntrStatus      ./gateway_app.obj 
 MCAN_clearNewDataStatus   ./gateway_app.obj 
 MCAN_config               ./gateway_app.obj 
 MCAN_enableIntr           ./gateway_app.obj 
 MCAN_enableIntrLine       ./gateway_app.obj 
 MCAN_getEndianVal         ./gateway_app.obj 
 MCAN_getErrCounters       ./gateway_app.obj 
 MCAN_getIntrStatus        ./gateway_app.obj 
 MCAN_getNewDataStatus     ./gateway_app.obj 
 MCAN_getOpMode            ./gateway_app.obj 
 MCAN_getProtocolStatus    ./gateway_app.obj 
 MCAN_getRevisionId        ./gateway_app.obj 
 MCAN_init                 ./gateway_app.obj 
 MCAN_isFDOpEnable         ./gateway_app.obj 
 MCAN_isMemInitDone        ./gateway_app.obj 
 MCAN_msgRAMConfig         ./gateway_app.obj 
 MCAN_readMsgRam           ./gateway_app.obj 
 MCAN_selectIntrLine       ./gateway_app.obj 
 MCAN_setBitTime           ./gateway_app.obj 
 MCAN_setExtIDAndMask      ./gateway_app.obj 
 MCAN_setOpMode            ./gateway_app.obj 
 MCAN_txBufAddReq          ./gateway_app.obj 
 MCAN_txBufTransIntrEnable ./gateway_app.obj 
 MCAN_writeMsgRam          ./gateway_app.obj 
 NimuEmacInitFxn           ./gateway_main.obj
 UART_printf               ./utils_prf.obj   
 
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "gatewayapp.out" not built
 
>> Compilation failure
makefile:145: recipe for target 'gatewayapp.out' failed
gmake[1]: *** [gatewayapp.out] Error 1
makefile:141: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****
 

I am not very sure as to what the cause of these errors might be, as all my header files seems to included correctly and contains the necessary declarations as well. Does seems as if the ARM linker is not linking the correct libraries (if linking any at all). However I am confused to what exact libraries to link it to:

The includes path can also be seenbelow:

I would greatly appreciate any assistance or advise as to what the cause of these problems might be, so that I can get these errors fixed. The complete project is also attached in the following .zip file if you would wish to try an reproduce the error: gatewayapp_test.zip

The following is true for my project:

- CCS: v9.1.0.00010

- Processor SDK RTOS for AM65xx v5.03.00.07

- SYS/BIOS v6.75.02.00

- NDK v3.40.01.01

- XDCTools v3.51.01.18_core

Any assistance or advise is greatly appreciated! Please let me know if any other info is required.

Kind regards,

Johnny

  • Hi,

    So I seem to have made some progress regarding this.

    Under Project->Properties->ARM Linker->File Search Path I added the search paths to the library files of all the drives mentioned in http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_examples_demos.html#can-eth-gatway-demo. These added paths can be seen in the screenshot below:

    I also added the following libraries from these included paths, which can be seen below:

    This solves most of the errors of the form: "unresolved symbol Board_init, first referenced in ./gateway_main.obj gatewayapp". However I am still struggling to figure out where these errors that I am still getting are coming from regarding the OSAL drive.

    For example symbol "Osal_free" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj" null: symbol "Osal_free" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"

    The complete build log can be found in the following .txt document: 

    **** Build of configuration Debug for project gatewayapp ****
    
    "C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -O 
     
    Building file: "../sysbios_cfg_r5.cfg"
    Invoking: XDCtools
    "C:/ti/ccs910/xdctools_3_55_02_22_core/xs" --xdcpath="C:/ti/bios_6_75_02_00/packages;C:/ti/bios_6_75_02_00/packages/ti/posix/ccs;C:/ti/ndk_3_40_01_01/packages;C:/ti/pdk_am65xx_1_0_4/packages;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.R5F -p ti.platforms.cortexR:AM6548 -r release -c "C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS" --compileOptions "-g" "../sysbios_cfg_r5.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring sysbios_cfg_r5.xer5f from package/cfg/sysbios_cfg_r5_per5f.cfg ...
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making C:/Users/Frikkie/workspace_v264/gatewayapp/src/sysbios/sysbios.aer5f ...
    Build of libraries done.
    cler5f package/cfg/sysbios_cfg_r5_per5f.c ...
    Finished building: "../sysbios_cfg_r5.cfg"
     
    Building file: "../network_api.c"
    Invoking: ARM Compiler
    "C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/bin/armcl" --code_state=32 -me --include_path="C:/Users/Frikkie/workspace_v264/gatewayapp" --include_path="C:/ti/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include" --define=SOC_AM65XX -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="network_api.d_raw" --cmd_file="configPkg/compiler.opt" "../network_api.c"
    Finished building: "../network_api.c"
     
    Building file: "../utils_prf.c"
    Invoking: ARM Compiler
    "C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/bin/armcl" --code_state=32 -me --include_path="C:/Users/Frikkie/workspace_v264/gatewayapp" --include_path="C:/ti/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include" --define=SOC_AM65XX -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="utils_prf.d_raw" --cmd_file="configPkg/compiler.opt" "../utils_prf.c"
    Finished building: "../utils_prf.c"
     
    Building file: "../gateway_osal.c"
    Invoking: ARM Compiler
    "C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/bin/armcl" --code_state=32 -me --include_path="C:/Users/Frikkie/workspace_v264/gatewayapp" --include_path="C:/ti/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include" --define=SOC_AM65XX -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="gateway_osal.d_raw" --cmd_file="configPkg/compiler.opt" "../gateway_osal.c"
    Finished building: "../gateway_osal.c"
     
    Building file: "../gateway_app.c"
    Invoking: ARM Compiler
    "C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/bin/armcl" --code_state=32 -me --include_path="C:/Users/Frikkie/workspace_v264/gatewayapp" --include_path="C:/ti/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include" --define=SOC_AM65XX -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="gateway_app.d_raw" --cmd_file="configPkg/compiler.opt" "../gateway_app.c"
    Finished building: "../gateway_app.c"
     
    Building file: "../gateway_main.c"
    Invoking: ARM Compiler
    "C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/bin/armcl" --code_state=32 -me --include_path="C:/Users/Frikkie/workspace_v264/gatewayapp" --include_path="C:/ti/bios_6_75_02_00/packages/ti/posix/ccs" --include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include" --define=SOC_AM65XX -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="gateway_main.d_raw" --cmd_file="configPkg/compiler.opt" "../gateway_main.c"
    Finished building: "../gateway_main.c"
     
    Building target: "gatewayapp.out"
    Invoking: ARM Linker
    "C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/bin/armcl" --code_state=32 -me --define=SOC_AM65XX -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"gatewayapp.map" -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/lib" -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-arm_18.12.2.LTS/include" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/csl/lib/am65xx/r5f/release" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/board/lib/am65xx_idk/r5f/release" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/osal/lib/tirtos/am65xx/r5f/release" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/sciclient/lib/am65xx/mcu1_0/release" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/emac/lib/am65xx/r5f/release" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/udma/lib/am65xx/mcu1_0/release" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/drv/uart/lib/am65xx/r5f/release" -i"C:/ti/pdk_am65xx_1_0_4/packages/ti/transport/ndk/nimu/lib/am65xx/r5f/release" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="gatewayapp_linkInfo.xml" --rom_model -o "gatewayapp.out" "./gateway_app.obj" "./gateway_main.obj" "./gateway_osal.obj" "./network_api.obj" "./utils_prf.obj" "../linker_r5.lds" -l"configPkg/linker.cmd" -lti.csl.aer5f -lti.csl.init.aer5f -lti.board.aer5f -lti.osal.aer5f -lsciclient.aer5f -lti.drv.emac.aer5f -ludma.aer5f -lti.drv.uart.aer5f -lti.drv.uart.profiling.aer5f -lti.transport.ndk.nimu.aer5f -lti.transport.ndk.nimu.profiling.aer5f -llibc.a 
    <Linking>
    error #10056: symbol "Osal_TaskCreate" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
    error #10056: symbol "Osal_malloc" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
    error #10056: symbol "Osal_free" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
    error #10056: symbol "Osal_TaskCreate_v2" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
    error #10056: symbol "Osal_TaskSleep" redefined: first defined in "./gateway_osal.obj"; redefined in "./utils_prf.obj"
    error #10010: errors encountered during linking; "gatewayapp.out" not built
     
    >> Compilation failure
    makefile:156: recipe for target 'gatewayapp.out' failed
    gmake[1]: *** [gatewayapp.out] Error 1
    makefile:152: recipe for target 'all' failed
    gmake: *** [all] Error 2
    
    **** Build Finished ****

    Where does these errors come from? Any assistance would be greatly appreciated.

    Regards,

    Johnny

  • Hi Johnny,

    The OSAL_free redefined issue was cause by the inclusion of gateway_osal.c in your project. If you check the processor_sdk_rtos_am65xx_5_03_00_07\demos\gateway-demos\can-eth-gateway\build\makefile.mk, you will see the utils_prf.c is included, but gateway_osal,c is not.

    Best regards,

    Ming