cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble integrating ThreadX v6.4.2 on STM32H747

JonConesa
Associate III

Hi,

 

I recently started a project using the STM32H747BIT MCU and I’m configuring ThreadX v6.4.2 as the RTOS. I followed the usual steps to integrate ThreadX into my system. I decided to use the ThreadX source from the GitHub repository instead of the version provided by CubeMX because ST’s CubeMX package does not include the latest ThreadX updates.

 

During the project configuration, I ran into some issues. I added the tx_api.h, tx_port.h, and libthreadx.a files to the M7 core’s makefile. However, I noticed that the _tx_initialize_low_level.S file is missing. Although the repository provides an example of _tx_initialize_low_level.S, it is not tailored for my MCU. Therefore, I copied the _tx_initialize_low_level.Sfile generated by CubeMX for an older version of ThreadX.

 

After including all these files, when I compile and try to call the functions _tx_initialize_kernel_setup and _tx_initialize_kernel_enter, I get the following error:

threadx/common/src/tx_initialize_kernel_enter.c:120:9: error: implicit declaration of function '_tx_initialize_low_level'; did you mean '_tx_initialize_high_level'? [-Wimplicit-function-declaration]

I understand why this error might occur when calling _tx_initialize_kernel_enter since I invoke tx_kernel_enter() to start the RTOS, which internally calls _tx_initialize_kernel_enter. However, I don’t understand why the error appears related to _tx_initialize_kernel_setup, since I am not explicitly calling that function.

 

Am I missing any step to compile successfully? Also, is there any guide or best practice to adapt the _tx_initialize_low_level.S file for the STM32H747?

 

Any guidance or suggestions will be greatly appreciated.

 

2 REPLIES 2
JonConesa
Associate III

Hi,

I’ve identified the compilation issue — it was caused by accidentally removing the declaration of:

VOID _tx_initialize_low_level(VOID);

 

As for the _tx_initialize_low_level.S file, I’m still having trouble understanding how to modify it correctly. Any guidance on how to adapt it properly would be appreciated.

Hello @JonConesa 

Could you please try with this one from STM32H747 project:

x-cube-azrtos-h7/Projects/STM32H747I-DISCO/Applications/ThreadX/Tx_MPU/Src/tx_initialize_low_level.S at main · STMicroelectronics/x-cube-azrtos-h7 · GitHub

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.
Saket_Om