FreeRTOS Starting Problems


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.


Configuring FreeRTOS Plus and additional libraries for STM32H735 with the IDE can be a bit tricky, especially if you’re new to FreeRTOS or the specific IDE you’re using. However, I’ll try my best to help you with the configuration process.

First, you need to make sure that you have downloaded the necessary FreeRTOS Plus libraries you want to use. These libraries are typically available from the official FreeRTOS website or GitHub repository.

Next, you’ll need to import or add these libraries to your project. The specific steps for this will depend on the IDE you’re using. For example, if you’re using STM32CubeIDE, you can import the FreeRTOS Plus libraries as follows:

  1. Open your project in STM32CubeIDE.
  2. Right-click on your project in the Project Explorer and select “Import…”
  3. In the Import wizard, expand the “General” category and select “File System”.
  4. Click “Next” and then “Browse…” to navigate to the location where you extracted or downloaded the FreeRTOS Plus libraries.
  5. Select the folders or files you want to import and click “Finish”.

After importing the libraries, you’ll need to configure your project to include and link against these libraries. Again, the specific steps will depend on your IDE, but generally, you’ll need to add the necessary include paths and library paths to your project settings.

For example, in STM32CubeIDE, you can do this by:

  1. Right-click on your project in the Project Explorer and select “Properties”.
  2. In the Properties window, navigate to “C/C++ Build” > “Settings” > “Tool Settings” > “MCU C Compiler” > “Include Paths”.
  3. Click “Add…” and navigate to the folder(s) containing the FreeRTOS Plus header files you want to include.
  4. Similarly, navigate to “C/C++ Build” > “Settings” > “Tool Settings” > “MCU Archiver” > “Library Paths” and add the path(s) to the FreeRTOS Plus library files.

After configuring the include and library paths, you should be able to use the FreeRTOS Plus functions and features in your code.

If you’re still having trouble, you may want to check the specific documentation or examples provided by the FreeRTOS Plus libraries you’re trying to use, as they may have additional configuration steps or requirements.

Additionally, if you’re using a specific development board or evaluation kit, the board manufacturer may have provided instructions or examples for configuring FreeRTOS Plus for that particular board.

If you continue to face issues, please feel free to provide more specific details about the IDE you’re using, the FreeRTOS Plus libraries you want to use, and the errors or issues you’re encountering, and I’ll try to provide more specific guidance.