cancel
Showing results for 
Search instead for 
Did you mean: 

AzureRTOS / FreeRTOS (in tickless mode) for STM32 M0+ MCUs

_richard
Associate III

looking into this community i see that 

- azureRTOS https://community.st.com/s/topic/0TO3W0000004ZG8WAM/azurertos is under STM32 MCUs https://community.st.com/s/topic/0TO0X000000BSqSWAW/stm32-mcus

- FreeRTOS_MPU https://community.st.com/s/topic/0TO0X0000005I9OWAU/freertosmpu is under STM32 MPUs https://community.st.com/s/topic/0TO0X0000003u2AWAQ/stm32-mpus

I don't really understand why FreeRTOS is not a sub topic for STM32 MCUs in the forum.

I looked into using FreeRTOS (in tickless mode) together with CubeMX and have the impression that the support for FreeRTOS in CubeMX is limited when it comes to regenerating code.  

I didn't work with AzureRTOS (in tickless mode) before.

From what i did see in a STM32C0 workshop FreeRTOS is not really a topic but AzureRTOS is promoted.

My questions to STM and the community:

- Is / will FreeRTOS for STM32 MCUs really be supported by STM ?

- Are the problems named in https://nadler.com/embedded/newlibAndFreeRTOS.html worked on / solved by STM ?

- Will STM support AzureRTOS primarily ?

Can you tell about / compare practical experience with AzureRTOS / FreeRTOS (in tickless mode) for STM32 M0+ MCUs?

1 ACCEPTED SOLUTION

Accepted Solutions
MWB_CHa
ST Employee

Hi @_richard​ ,

  • FreeRTOS is supported on all STM32 series. It comes in two formats:
    • Native mode (supported in STM32XX CubeFW package and configurable with STM32CubeMX)
    • Expansion mode (X-CUBE-FREERTOS package and configurable with STM32CubeMX) . This applies to all new series starting from STM32U5, STM32C0, STM32H5, ...
  • Azure RTOS (ThreadX) is now the default supported RTOS on new STM32 Series (which means delivered by default in STM32 CubeFW package and visible by default on STM32CubeMX)
  • Tickless mode is supported on both ThreadX and FreeRTOS and all Cortex cores (including CM0+)

(sorry I don't have details on the newlib topic)

I hope it helps.

Kind Regards,

View solution in original post

7 REPLIES 7
MWB_CHa
ST Employee

Hi @_richard​ ,

  • FreeRTOS is supported on all STM32 series. It comes in two formats:
    • Native mode (supported in STM32XX CubeFW package and configurable with STM32CubeMX)
    • Expansion mode (X-CUBE-FREERTOS package and configurable with STM32CubeMX) . This applies to all new series starting from STM32U5, STM32C0, STM32H5, ...
  • Azure RTOS (ThreadX) is now the default supported RTOS on new STM32 Series (which means delivered by default in STM32 CubeFW package and visible by default on STM32CubeMX)
  • Tickless mode is supported on both ThreadX and FreeRTOS and all Cortex cores (including CM0+)

(sorry I don't have details on the newlib topic)

I hope it helps.

Kind Regards,

_richard
Associate III

Thanks for your answer

in my case the native mode for FreeRTOS is needed (L0 hardware). as far as i see it now the xcube code generation can overwrite some necessary changes. see stm video concerning freertos.

the newlib question is interesting to me as this at the beginning of a project.

and i see no X-CUBE-AZRTOS-L0 package.

this would be interesting as maybe later a change to L4 may be needed. having built on FreeRTOS may be a disadvantage then, with freertos not getting primary support and open newlib question.

-> will X-CUBE-AZRTOS-L0 become avaliable soon (together with X-CUBE-AZRTOS-C0) ?

MWB_CHa
ST Employee

Hi @_richard​ 

Both L0 and L4 don't need any X-CUBE-FREERTOS package, since they remain supported by the native mode on STM32CubeMX with native FreeRTOS.

So if your target is L0/L4 you don't need to change anything.

The changes I mentioned above are relative only to new series released after STM32U5 (ie. STM32U5, STM32H5, STM32C0, ...)

_richard
Associate III

i understand that in my case the native mode for FreeRTOS is needed -> ther is still the code generation issue mentioned.

my newlib question and the question concerning X-CUBE-AZRTOS-L0 package are still open

best regards

richard

MWB_CHa
ST Employee

OK let's manage each point separately:

1. There is no X-CUBE-AZRTOS for L0 (and nothing is planned in the future). X-CUBE-AZRTOS is deployed only on following series: STM32H7, STM32F7, STM32F4, STM32L4, STM32L5, STM32G4, STM32G0, STM32WB, STM32WL.

No other series are concerned by X-CUBE-AZRTOS package.

As I explained before, of course, all new STM32 series (STM32U5, STM32H5, STM32C0, ...) get Azure RTOS middleware natively and do not also need X-CUBE-AZRTOS package.

2. NewLib : Could you please precise your issue exactly ? (for example is it using malloc inside USB stack ? or other ?)

_richard
Associate III

1)

yes,

i see there is no X-CUBE-AZRTOS-L0 package ->

will X-CUBE-AZRTOS-L0 become available soon (together with X-CUBE-AZRTOS-C0) ?

2)

it is a new project. i can not answer now how the code will look.

my impression is that mr. nadler knows the topic and that his remarks in https://nadler.com/embedded/newlibAndFreeRTOS.html could become relevant. I thought that STM might have an answer on that.

1) I can confidently confirm that there is and there will be no X-CUBE-AZRTOS-L0 in the foreseen future.

2) I can't answer directly mr. Nadler. I respect his point of view, but there are points raised in that post that are not correct or not relevant or no more relevant today.

I suggest that you build your project and check by yourself and if you find any issues, we're here to help.