FreeRTOS Starting Problems

Hello,

I’m getting started with FreeRTOS for STM32h735, and with the IDE configuration, I can compile and run projects successfully.

However, I want to use FreeRTOS Plus and additional libraries. The issue is that I can’t configure it with the IDE. I’ve followed dozens of tutorials and read the getting started manual several times, but I can’t seem to configure it properly to run a simple blink.

Can anyone help me?

Thank you very much.

Can you clarify the ask - what is it you are wanting to do without the IDE? Build the code? Flash the MCU? Know the code is running? Or something else?

Hi @rtel,

I am going to try to explain my problem in more detail.

I use the STMCubeIDE (which includes CubeMX) IDE to configure my projects on the stm32h735 board, including the use of pins, clocks, and basic configurations…

In the IDE itself, there is an option under Middlewares that allows configuring FreeRTOS, but I want to be able to do it “manually” with the available repositories. The goal is to configure FreeRTOS to implement FreeRTOS Plus in the near future.

I have some questions where I need guidance:

Folder distribution: I notice differences in the folder structure I follow in the associated documentation and the projects generated by the IDE when I activate the FreeRTOS option.

CMSIS_RTOS folder: This is generated by the IDE, but I can't find any reference to it in the FreeRTOS "getting started" documentation.

With the folder system generated by the IDE in portable/GCC, I find ARM_CM4F (it works well). However, in the stm32h735 DataSheet, it reads Arm® Cortex®-M7. Should I choose ARM_CM7? And if so, should I use the r0p1 path?

The documentation suggests using the FreeRTOSConfig.h file from the Demos, but the problem is that it doesn't exist for stm32h735. Which one should I use? Perhaps the one from CORTEX_M7_M4_AMP_STM32H745I_Discovery_IAR?

I understand that versioning is crucial. For projects generated by the IDE, the FreeRTOS.h file states v10.3, while in the repositories, I see 10.5. This causes problems like:

/* definition and creation of defaultTask */ osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 512); defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);

osThreadCreate is undefined.

Any help will be eternally appreciated.

CMSIS_RTOS is a wrapper and is not strictly needed. You can choose not to use it.

You can continue using ARM_CM4F port.

The IDE generates a FreeRTOSConfig.h file and you should use that.

That is happening because you are using CMSIS_RTOS wrapper. Try using the native FreeRTOS APIs like xTaskCreate. Feel free to put your code in a repo and share a link if you still face any problem.

2 Likes