cancel
Showing results for 
Search instead for 
Did you mean: 

What happens to FreeRTOS code generation?

TManiac
Associate III

Today my STM32CubeIDE does an update to the Version: 1.11.0 (Build: 13638_20221122_1308 (UTC) ) including the CubeMX Version: 6.7.0-RC2 (Build: 20221118-1646 (UTC))

Using the FreeRTOS Middleware the generation of the main file has a big bug. There will be the "USER CODE Header" lines instead of the FreeRTOS lines inseide the main()-function.

This happens also if I create a new empty project using the FreeRTOS middleware. It will generate the attached main-c-file. See lines 145-151.

I haven't searched where the bug comes from.

8 REPLIES 8
Starick
Associate

Having the same problem after updating STM32CubeIDE. I think this is a bug in STM32CubeMX made by ST developers.

TManiac
Associate III

I have tested a little bit with manual editing the ioc-file.

this were the lines before updating STM32CubeIDE:

MxCube.Version=6.6.1
MxDb.Version=DB.6.0.60

After the update this changed to:

MxCube.Version=6.7.0
MxDb.Version=DB.6.0.70

The code generation worked in correct way if I change to:

MxCube.Version=6.7.0
MxDb.Version=DB.6.0.61

but it does the same stupid thing if I use the new database:

MxCube.Version=6.6.1
MxDb.Version=DB.6.0.70

So it seams a problem inside the database

TManiac
Associate III

I have found it ��

Inside the FREERTOS-STM32F4xx_Configs.xml file is a error in line 349

line 349:    <RefConfigFile Description="Variable creation then launch the RTOS" Name="CREATION_V2" Template="?freertos_init_c_cmsis_v2.ftl">
line 350:        <File Category="source" Condition="all" Name="rtos_obj_creat.tmp" Version="10.3.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/>
        <Argument Comment="User events" GenericType="rtos_list" Name="Events"/>  <!-- NEW FOR EVENTS -->
        <Argument Comment="API in use" GenericType="simple" Name="FreeRTOS_API"/>   <!--  need to distinguish CMSIS v1 and v2 -->
    </RefConfigFile>

There is a question mark as first sign of the template name. Remove it and it works.

I have done a short view on other FREERTOS-STM32F configs. They are without this error.

This files comes with the STM32CubeIDE-update. So it will be overwritten if it does a new (re-)update

Do you work with an STM32F4xx controller? I have solved the problem :-)

Indeed, the problem was in this sign "?" in FREERTOS-STM32F4xx_Configs.xml ....Probably someone joked in ST ��. Now appeared an initialization of tasks, semaphores, mutexes after calling the osKernelInitialize() function. Thanks buddy!

Ghofrane GSOURI
ST Employee

Hello @Jens Räthe​ 

Thank you for your contributions and for your detailed explanations,

I confirm the issue on my side, it has been reported to STM32CubeMX development team .

Internal ticket number: 140318(This is an internal tracking number and is not accessible or usable by customers).

I will keep you posted with updates.

Regards,

Ghofrane

It's been 3 months and a newer version of STM32CubeMX has been released, but the problem still hasn't been solved.

Ghofrane GSOURI
ST Employee

Hello @Jens Räthe​ 

I am glad to inform you that the Internal ticket number: 140318 is fixed and integrated in the latest CubeMX version 6.8.0 .

This is the LINK for downloading it .

Thanks again for your contributions .

 Ghofrane

Ghofrane.