2026-02-26 3:28 AM
I have unrecoverable errors building on STM32CubeIDE a project generated by STM32CubeMX.
The errors arise compiling assembly .s sources for ThreadX.
Versions:
STM32CubeMX 6.17.0
STM32CubeIDE 2.1.0
Error (excerpt from build console):
arm-none-eabi-gcc -mcpu=cortex-m4 -g3 -DDEBUG -c -I../Core/Inc -I../AZURE_RTOS/App -I../Drivers/STM32L4xx_HAL_Driver/Inc -I../Drivers/STM32L4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32L4xx/Include -I../Drivers/CMSIS/Include -I../Middlewares/ST/threadx/common/inc/ -I../Middlewares/ST/threadx/ports/cortex_m4/gnu/inc/ -I../Middlewares/ST/threadx/utility/low_power/ -x assembler-with-cpp -MMD -MP -MF"Middlewares/ST/threadx/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.d" -MT"Middlewares/ST/threadx/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Middlewares/ST/threadx/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.o" "../Middlewares/ST/threadx/ports/cortex_m4/gnu/src/tx_thread_interrupt_disable.S"
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s: Assembler messages:
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:25: Error: bad instruction `extern __aeabi_memset'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:26: Error: bad instruction `extern _tx_thread_current_ptr'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:27: Error: bad instruction `extern _tx_thread_interrupt_disable'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:28: Error: bad instruction `extern _tx_thread_interrupt_restore'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:29: Error: bad instruction `extern _tx_thread_stack_analyze'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:30: Error: bad instruction `extern _tx_thread_stack_error_handler'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:31: Error: bad instruction `extern _tx_thread_system_state'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:41: Error: bad instruction `public _tx_misra_always_true'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:42: Error: bad instruction `public _tx_misra_block_pool_to_uchar_pointer_convert'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:43: Error: bad instruction `public _tx_misra_byte_pool_to_uchar_pointer_convert'
../Middlewares/ST/threadx/ports/cortex_m4/iar/src/tx_misra.s:44: Error: bad instruction `public _tx_misra_char_to_uchar_pointer_convert'
I have attached the .ioc file.
The project name can be misleading, the target is NUCLEO-L496ZG board, which has a 144-pin microcontroller.
2026-02-26 5:33 AM
Hello @Adriano Melis
Thank you for posting!
I am checking this behavior internally, what version of toolchain have you used?
KR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2026-02-26 5:40 AM
as i posted
STM32CubeMX 6.17.0
STM32CubeIDE 2.1.0
STM32Cube FW_L4 V1.18.2
ThreadX version 6.2.0
2026-02-27 2:35 AM
Hello @Adriano Melis
Using your ioc and building with STM32CubeIDE 2.1.0, I was not able to reproduce the issue:
KR, Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.