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.
Part Number: TDA4VMXEVM
Tool/software: Code Composer Studio
Hi,
I have a error at linking stage which I am not able to resolve: "undefined symbol".
Following setup: I work with PSDK RTOS v07.00.00.11 and TDA4EVMX.
I have one CCS Project (Shared_IPC_Echo), which is configured to build a static library for the R5F core.
Buildlog:
**** Build of configuration Debug for project Shared_IPC_Echo **** /home/thomas/ti/ccs1010/ccs/utils/bin/gmake -k -j 8 all -O Building file: "../main.c" Invoking: ARM Compiler "/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 -me --include_path="/home/thomas/workspace_v9_j721e/Shared_IPC_Echo" --include_path="/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/include" --include_path="/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages" --define=SOC_J721E -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d_raw" "../main.c" Finished building: "../main.c" Building file: "../IPCTools.c" Invoking: ARM Compiler "/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 -me --include_path="/home/thomas/workspace_v9_j721e/Shared_IPC_Echo" --include_path="/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/include" --include_path="/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages" --define=SOC_J721E -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="IPCTools.d_raw" "../IPCTools.c" Finished building: "../IPCTools.c" Building target: "Shared_IPC_Echo.lib" Invoking: ARM Archiver "/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/bin/armar" r "Shared_IPC_Echo.lib" "./IPCTools.obj" "./main.obj" ==> new archive 'Shared_IPC_Echo.lib' ==> building archive 'Shared_IPC_Echo.lib' Finished building target: "Shared_IPC_Echo.lib" **** Build Finished ****
I have another CCS Project (MCU1_0_IPC_Echo), which uses Shared_IPC_Echo and has a reference on it.
The linking stage fails, this is the build output:
**** Build of configuration Debug for project MCU1_0_IPC_Echo **** /home/thomas/ti/ccs1010/ccs/utils/bin/gmake -k -j 8 all -O Building target: "MCU1_0_IPC_Echo.out" Invoking: ARM Linker "/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/bin/armcl" -mv7R5 --code_state=32 --float_support=VFPv3D16 -me --define=SOC_J721E --define=BUILD_MCU1_0 -g --cpp_default --diag_warning=225 --diag_wrap=off --display_error_number -z -m"MCU1_0_IPC_Echo.map" -i"/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/lib" -i"/home/thomas/tda4vmx/psdk/ti-cgt-arm_20.2.0.LTS/include" -i"/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages/ti/board/lib/j721e_evm/mcu1_0/debug" -i"/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages/ti/drv/sciclient/lib/j721e/mcu1_0/debug" -i"/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages/ti/csl/lib/j721e/r5f/debug" -i"/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages/ti/drv/i2c/lib/j721e/r5f/debug" -i"/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages/ti/osal/lib/tirtos/j721e/r5f/debug" -i"/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages/ti/drv/uart/lib/j721e/r5f/debug" -i"/home/thomas/tda4vmx/psdk/pdk_jacinto_07_00_00/packages/ti/drv/ipc/lib/j721e/mcu1_0/debug" -i"/home/thomas/workspace_v9_j721e/internalDependencies/Shared_IPC_Echo/Debug" -i"/home/thomas/workspace_v9_j721e/Shared_IPC_Echo/Debug" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="MCU1_0_IPC_Echo_linkInfo.xml" --rom_model -o "MCU1_0_IPC_Echo.out" "./Timedebug.obj" "./ipc_apputils.obj" "./main.obj" "../linker_r5f_mcu1_0_sysbios.lds" -l"configPkg/linker.cmd" -l"/home/thomas/workspace_v9_j721e/Shared_IPC_Echo/Debug/Shared_IPC_Echo.lib" -lShared_IPC_Echo.lib -llibc.a -lti.board.aer5f -lsciclient.aer5f -lti.csl.aer5f -lti.drv.i2c.aer5f -lti.osal.aer5f -lti.drv.uart.aer5f -lipc.aer5f <Linking> undefined first referenced symbol in file --------- ---------------- waitForOtherCore(RPMessage_Object_s *, unsigned int, const char *, unsigned int) ./main.obj error #10234-D: unresolved symbols remain error #10010: errors encountered during linking; "MCU1_0_IPC_Echo.out" not built >> Compilation failure makefile:150: recipe for target 'MCU1_0_IPC_Echo.out' failed gmake[1]: *** [MCU1_0_IPC_Echo.out] Error 1 gmake: *** [all] Error 2 makefile:146: recipe for target 'all' failed **** Build Finished ****
The library is located at "/home/thomas/workspace_v9_j721e/Shared_IPC_Echo/Debug", there exists a symlink which points also to that folder (/home/thomas/workspace_v9_j721e/internalDependencies/Shared_IPC_Echo/Debug).
I don't understand why the linker cannot resolve the symbol. The library "Shared_IPC_Echo.lib" does exists at the path /home/thomas/workspace_v9_j721e/Shared_IPC_Echo/Debug.
Can you help me?
Best regards,
Thomas
Hello Thomas,
Can your share the Shared_IPC_Echo.lib file? Please zip and attach to this thread. If you wish to share it privately, please start a private conversation with me.
Thanks
ki
Hello Ki,
thank you very much for jumping in!
Meanwhile I found the issue. I share the solution, maybe it will help others as well:
I configured CCS project MCU1_0_IPC_Echo with enabled "Treat C files as C++ files".
I did not do that in my Shared_IPC_Echo. So I think the linker of MCU1_0_IPC_Echo could not resolve the symbol because of function name mangling?
I'm not 100% sure about this, but after I enabled "Treat C files as C++ files" at Shared_IPC_Echo, linking stage works!
Best regards,
Thomas