Skip to main content
Associate II
Feb 21, 2025 6:10 PM UTC
Solved

POSIX support in FreeRTOS on STM32

Hello,
As far as I know,
STM32 does not support the POSIX abstraction layer for FreeRTOS.

That means I can not use functions like:

  • Interact with tasks through: 'pthread_create', 'pthread_join'..
  • Use POSIX glue elements like: 'pthread_mutex'...
  • Etc

If I am porting a big FreeRTOS project that is using POSIX to STM32:  what I need to do? Is there a way of achieving it painlessly?

Thanks,

Carles

This topic has been closed for replies.
mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
Feb 21, 2025 6:15 PM UTC

Hello,

I don't think POSIX-FreeRTOS is supported natively by STM32 but I think you need to do it yourself. See https://www.freertos.org/Documentation/03-Libraries/05-FreeRTOS-labs/03-FreeRTOS-plus-POSIX/00-FreeRTOS-Plus-POSIX

https://github.com/FreeRTOS/Lab-Project-FreeRTOS-POSIX

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.

10 replies

mƎALLEm
mƎALLEmBest answer
ST Technical Moderator
Feb 21, 2025 6:15 PM UTC

Hello,

I don't think POSIX-FreeRTOS is supported natively by STM32 but I think you need to do it yourself. See https://www.freertos.org/Documentation/03-Libraries/05-FreeRTOS-labs/03-FreeRTOS-plus-POSIX/00-FreeRTOS-Plus-POSIX

https://github.com/FreeRTOS/Lab-Project-FreeRTOS-POSIX

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Associate II
Feb 22, 2025 5:40 PM UTC

Thanls @mƎALLEm ,

I will try to use this FreeRTOS Lab Project and will see if it works (and then I will set it as 'Accept as Solution'.

Many thanks!