Easily Porting the ThreadX Ecosystem Using STM32CubeMX

STM32CubeMX 6.15.0: Easily Porting the ThreadX Ecosystem, Development Has Never Been So Smooth!

1. The version of STM32CubeMX used is 6.15.0

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

2. Declaration: This article takes STM32F407 as an example

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

First, let’s take a look at which series are currently supported. We can see that the F series only supports F4 at a minimum, while the F1 series is not yet supported. It is uncertain whether it will be supported in the future.

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

As of July 23, 2025, the latest version on GitHub is 6.4.2

Easily Porting the ThreadX Ecosystem Using STM32CubeMX The version supported on CubeMX is slightly lower at 6.1.10

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

From the above image, it is clear that CubeMX is compatible with the ThreadX system

  • RTOS ThreadX is the kernel
  • File System FileX is the file system
  • File System LevelX is a component for flash storage wear leveling
  • File System Interfaces are selected as needed
  • USB USBX is the USB protocol stack
  • Network NetXDuo is the network protocol stack

The above components meet the vast majority of daily development needs, and the integration is seamless; just check the boxes, and porting has never been so smooth.

3. Kernel Selection

Easily Porting the ThreadX Ecosystem Using STM32CubeMX Simply check the boxes to complete the porting work; it’s so easy that it can be considered a no-brainer operation.

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

4. Modify the clock base to 1000, which means an interrupt every 1ms

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

5. Modify the HAL library’s base clock to TIM14

Easily Porting the ThreadX Ecosystem Using STM32CubeMX It is important to note that the Timebase Source here needs to be changed because the RTOS requires SysTick as the operating system’s time base.

6. Change to external crystal oscillator

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

Check this based on whether your board uses an external crystal oscillator.

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

From the interrupts, we can see that the RTOS uses three system interrupt sources.

7. Update the system clock

Easily Porting the ThreadX Ecosystem Using STM32CubeMX For clock settings, after checking the external crystal oscillator, input the maximum supported frequency of 168 and press enter to automatically calculate the parameters.

8. Change the compilation IDE to MDK-ARM

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

9. Configure the project

Easily Porting the ThreadX Ecosystem Using STM32CubeMX

10. Compile

Easily Porting the ThreadX Ecosystem Using STM32CubeMX After compilation, we see the desired double zeros.

Note: If you need the STM32CubeMX 6.15.0 installation package, feel free to message or leave a comment;

Leave a Comment