Getting linker error when -flto flag has been used in RA2L1 series MCU with FreeRTOS. – Forum – RA MCU
Hi,
I am Using RA2L1 series MCC with FreeRTOS, i am using -flto(link time optimization) flag and see following error in with respect to port.c file
../ra/fsp/src/rm_freertos_port/port.c:448: undefined reference to `rm_freertos_port_restore_task_stackless’
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\104714\AppData\Local\Temp\TStat_1.77_RA2.elf.PMTygJ.ltrans5.ltrans.o: in function `_stacking_used_msp’:
../ra/fsp/src/rm_freertos_port/port.c:321: undefined reference to `vPortSVCHandler_C’
c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/thumb/v8-m.base/nofp\librdimon_nano.a(rdimon-syscalls.o): in function `_sbrk’:
syscalls.c:(.text._sbrk+0x3c): undefined reference to `end’
How to resolve these linker time issues as this port.c is provided by renesas. Compiler version GCC 9.2.1.20191025
Read more here: Source link