renesas / fsp

Flexible Software Package (FSP) for Renesas RA MCU Family
https://renesas.github.io/fsp/
Other
182 stars 82 forks source link

Linker fails when used RA6 + ThreadX with Option -flto #338

Closed sebastian-dev closed 4 months ago

sebastian-dev commented 6 months ago

Create a new C/C++ Project with any RA6 + ThreadX. When you enable the Link Time Optimizer (-flto) in the options the linker fails with the error: ../ra/fsp/src/rm_threadx_port/tx_thread_schedule.c:325:(.text.PendSV_Handler+0x68): undefined reference to _tx_port_wait_thread_ready'

to fix this issue you have to change in tx_thread_schedule.c the function: from: __attribute((weak)) void * _tx_port_wait_thread_ready (VOID) to __attribute((weak, used)) void * _tx_port_wait_thread_ready (VOID)

renesas-brandon-hussey commented 5 months ago

This is being internally tracked using FSPRA-2284.