You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running ThreadX from tag v6.4.1_rel with modules-enabled kernel.
When compiled with TX_SINGLE_MODE_SECURE - it hard faults after first enter to the scheduler and PendSV interrupt.
PendSV interrupt executes until returning from exception.
EXC_RETURN was set to 0xFFFFFFBC and that was causing aforementioned hardfault.
After applying patch below - scheduler runs successfully.
I confirmed that this was a bug in v6.4.1_rel. The GNU Cortex-M33 module manager’s tx_thread_stack_build.s contained the TX_SINGLE_MODE_SECURE conditional, but GAS did not preprocess the lowercase .s file. Both branches were therefore assembled, and 0xFFFFFFBC overwrote the secure 0xFFFFFFFD value in the initial thread frame.
I fixed this on dev in #672 by renaming the affected assembly source to .S, and I added checks that assemble the GNU module ports with their feature macros enabled. I do not recommend overriding lr in the scheduler because it must retain the saved EXC_RETURN properties, including the floating-point frame state.
I am closing this as fixed. Thank you for reporting it and for providing the diagnosis.
Activity
fdesbiens commentedon Jan 24, 2025
Thank you for this question, @Jasinsky.
@eclipse-threadx/iot-threadx-committers and @eclipse-threadx/iot-threadx-contributors: can one of you please comment on this issue?
fdesbiens commentedon Sep 23, 2026
I confirmed that this was a bug in
v6.4.1_rel. The GNU Cortex-M33 module manager’stx_thread_stack_build.scontained theTX_SINGLE_MODE_SECUREconditional, but GAS did not preprocess the lowercase.sfile. Both branches were therefore assembled, and0xFFFFFFBCoverwrote the secure0xFFFFFFFDvalue in the initial thread frame.I fixed this on
devin #672 by renaming the affected assembly source to.S, and I added checks that assemble the GNU module ports with their feature macros enabled. I do not recommend overridinglrin the scheduler because it must retain the savedEXC_RETURNproperties, including the floating-point frame state.I am closing this as fixed. Thank you for reporting it and for providing the diagnosis.