cancel
Showing results for 
Search instead for 
Did you mean: 

error building STM32CubeMX L4 project - threadx assembly source files

Adriano Melis
Associate III

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.

 

3 REPLIES 3
Souhaib MAZHOUD
ST Employee

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.

as i posted

STM32CubeMX 6.17.0
STM32CubeIDE 2.1.0

STM32Cube FW_L4 V1.18.2

ThreadX version 6.2.0

Hello @Adriano Melis 

Using your ioc and building with STM32CubeIDE 2.1.0, I was not able to reproduce the issue:

 
 

Screenshot 2026-02-27 113123.png

 

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.