cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS vs ThreadX for STM32U575

ire
Associate II

Hi!

I want to build a project for STM32U575. I want to use FreeRTOS, but it seems like there are some functions that won't work with it (like the SD). Is there any place where I can see what works or doesn't with each one? Or if  I can use FreeRTOS anyways and still use the SD?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

It is certainly possible to use FatFS under FreeRTOS.

 

https://elm-chan.org/fsw/ff/

https://github.com/Bsm-B/Stm32-FatFs-FreeRTOS

https://community.st.com/t5/mems-sensors/how-can-i-write-and-read-on-sd-using-freertos-e-fatfs/td-p/143664

 

 

 

There is also a FreeRTOS version called "FreeRTOS-Plus-FAT":

https://freertos.org/Documentation/03-Libraries/05-FreeRTOS-labs/04-FreeRTOS-plus-FAT/FreeRTOS_Windows_Port_Examples

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

View solution in original post

6 REPLIES 6
Andrew Neil
Super User

Note that ST are moving back to FreeRTOS as their preferred RTOS:

https://community.st.com/t5/stm32-mcus-embedded-software/freertos-replacing-threadx-as-the-main-kernel-may-2025-stm32/m-p/802609

 


@ire wrote:

it seems like there are some functions that won't work with it (like the SD).


What makes you say that? It certainly is possible to have SD Cards working with FreeRTOS.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I say that because, when I try to configure my board on STM32Cube, FILEX(for using the SD) is avaiable if I choose ThreadX, but not with FreeRTOS.

ire_0-1749031023160.png

ire_1-1749031094349.png

 

 

That's not a limitation of SD itself.

That's because FileX is part of the ThreadX (formerly "Azure RTOS") suite;

For FreeRTOS, FatFS was used as the filesystem component:

AndrewNeil_0-1749031685098.png

https://wiki.st.com/stm32mcu/wiki/Introduction_to_Azure_RTOS_with_STM32

 

The New Direction is now to integrate FileX with FreeRTOS:

https://community.st.com/t5/stm32-mcus-embedded-software/freertos-replacing-threadx-as-the-main-kernel-may-2025-stm32/m-p/802616/highlight/true#M63432

But they haven't done that yet.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Sure, but I tried to put Fatfs in my project (from another proyect because I can't integrate it with STM32Cube) and I was getting a lot of errors like undefined variables from the libraries that I couldn't solve, so I tried with FileX and it worked eaisily. From your point of view, it's better to try to integrate Fatfs from another place (i wish if you could tell me form where) or migrate from FreeRTOS to ThreadX?

 

It is certainly possible to use FatFS under FreeRTOS.

 

https://elm-chan.org/fsw/ff/

https://github.com/Bsm-B/Stm32-FatFs-FreeRTOS

https://community.st.com/t5/mems-sensors/how-can-i-write-and-read-on-sd-using-freertos-e-fatfs/td-p/143664

 

 

 

There is also a FreeRTOS version called "FreeRTOS-Plus-FAT":

https://freertos.org/Documentation/03-Libraries/05-FreeRTOS-labs/04-FreeRTOS-plus-FAT/FreeRTOS_Windows_Port_Examples

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
ire
Associate II

Ok, I'll try it. Thank you!