Other Parts Discussed in Thread: SYSBIOS
Hello,
We are working on the TDA4VM platform. We are working on the MCU Island core MCU1_0. We are creating a build procedure. The application is on TI RTOS. Compiler is "aarch64-none-elf-gcc". We are getting below mentioned linking error. Could you please suggest the libraries that we have to include in the build process to remove these linking errors?
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/startup/main/zf_main.c.obj: in function `main':
zf_main.c:(.text.main+0x0): multiple definition of `main'; CMakeFiles/zf_adas.dir/CMakeFiles/3.16.3/CompilerIdC/CMakeCCompilerId.c.obj:CMakeCCompilerId.c:(.text.main+0x0): first defined here
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: /home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/lib/crt0.o: in function `_cpu_init_hook':
/tmp/dgboter/bbs/rhev-vm1--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/src/newlib-cygwin/libgloss/aarch64/crt0.S:269: undefined reference to `__stack'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/mcal/can/static/src/mcan.c.obj: in function `MCAN_writeMsgNoCpy':
mcan.c:(.text.MCAN_writeMsgNoCpy+0x2e8): undefined reference to `CSL_armR5Dsb'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/startup/main/zf_main.c.obj: in function `ti_sysbios_knl_Task_Params_init':
zf_main.c:(.text.ti_sysbios_knl_Task_Params_init+0x28): undefined reference to `ti_sysbios_knl_Task_Params__init__S'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/startup/main/zf_main.c.obj: in function `main':
zf_main.c:(.text.main+0x34): undefined reference to `xdc_runtime_Error_init__E'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: zf_main.c:(.text.main+0x84): undefined reference to `ti_sysbios_knl_Task_create'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: zf_main.c:(.text.main+0x9c): undefined reference to `ti_sysbios_BIOS_exit__E'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: zf_main.c:(.text.main+0xa0): undefined reference to `ti_sysbios_BIOS_start__E'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/util/app_r5f_Pmu.c.obj: in function `AppUtils_TimerInit':
app_r5f_Pmu.c:(.text.AppUtils_TimerInit+0x18): undefined reference to `CSL_armR5PmuCfg'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_r5f_Pmu.c:(.text.AppUtils_TimerInit+0x1c): undefined reference to `CSL_armR5PmuReadCntrOverflowStatus'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_r5f_Pmu.c:(.text.AppUtils_TimerInit+0x38): undefined reference to `CSL_armR5PmuClearCntrOverflowStatus'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_r5f_Pmu.c:(.text.AppUtils_TimerInit+0x44): undefined reference to `CSL_armR5PmuCfgCntr'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_r5f_Pmu.c:(.text.AppUtils_TimerInit+0x4c): undefined reference to `CSL_armR5PmuEnableAllCntrs'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/util/app_r5f_Pmu.c.obj: in function `AppUtils_TimerGetCurrTick':
app_r5f_Pmu.c:(.text.AppUtils_TimerGetCurrTick+0x24): undefined reference to `CSL_armR5PmuEnableCntr'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_r5f_Pmu.c:(.text.AppUtils_TimerGetCurrTick+0x3c): undefined reference to `CSL_armR5PmuReadCntr'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/util/app_utils.c.obj: in function `AppUtils_GetStackUsage':
app_utils.c:(.text.AppUtils_GetStackUsage+0xc): undefined reference to `__stack'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_GetStackUsage+0x10): undefined reference to `__stack'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_GetStackUsage+0x24): undefined reference to `__STACK_SIZE'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_GetStackUsage+0x28): undefined reference to `__STACK_SIZE'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/util/app_utils.c.obj: in function `AppUtils_CheckStackAndSectionCorruption':
app_utils.c:(.text.AppUtils_CheckStackAndSectionCorruption+0x14): undefined reference to `__STACK_SIZE'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_CheckStackAndSectionCorruption+0x18): undefined reference to `__STACK_SIZE'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/util/app_utils.c.obj: in function `AppUtils_Init':
app_utils.c:(.text.AppUtils_Init+0x14): undefined reference to `Board_init'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/util/app_utils.c.obj: in function `AppUtils_SetCpuFrequency':
app_utils.c:(.text.AppUtils_SetCpuFrequency+0x1c): undefined reference to `Sciclient_pmGetModuleClkFreq'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_SetCpuFrequency+0x34): undefined reference to `Osal_getHwAttrs'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_SetCpuFrequency+0x88): undefined reference to `Osal_setHwAttrs'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: CMakeFiles/zf_adas.dir/util/app_utils.c.obj: in function `AppUtils_ModuleClockEnable':
app_utils.c:(.text.AppUtils_ModuleClockEnable+0x4c): undefined reference to `Sciclient_pmGetModuleState'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_ModuleClockEnable+0x74): undefined reference to `Sciclient_pmSetModuleState'
/home/chetan/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/9.2.1/../../../../aarch64-none-elf/bin/ld: app_utils.c:(.text.AppUtils_ModuleClockEnable+0x98): undefined reference to `Sciclient_pmSetModuleRst'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/zf_adas.dir/build.make:1554: zf_adas] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/zf_adas.dir/all] Error 2
Thanks,
Chetan