cancel
Showing results for 
Search instead for 
Did you mean: 

How to: CubeMX + FreeRTOS + CrossStudio

KKjel.1
Senior

I am trying to add FreeRTOS support in an STM32CubeMX project, and import into Rowley CrossStudio.

In CubeMX, I have tried all toolchains, and then import them into CrossStudio.

But none of them works, and I get a ton of compiler errors.

When generating an STM32Cube IDE project (GCC/Eclipse), and import into CrossStudio, I get problems with newlib library, which are impossible to solve.

Has anyone experience with generating a CubeMX project with FreeRTOS enabled, and import into Rowley CrossStudio?

I have made projects without FreeRTOS support, and importing into CrossStudio works fine.

But when adding FreeRTOS, things gets messy...

Thanks !

Kaare

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @KKjel.1,

This issue is fixed in STM32CubeMX latest release.

V6.5.0 is now available under this Link.

When your issue is solved, please close this topic by choosing Select as Best.

Thanks for your contribution.

Sara.

View solution in original post

11 REPLIES 11
Sara BEN HADJ YAHYA
ST Employee

Hello @Kåre Kjeldsen​ ,

Thanks for your feedback,

Did you get any error when you compiled your project using CubeIDE and before importing it to CrossStudio ?, if so could you please share your .ioc file?

Thanks,

Sara.

Hi Sara

Yes, I do get an error when creating an STM32Cube IDE project:

../Core/Src/main.c:156:26: error: 'PWR_DIRECT_SMPS_SUPPLY' undeclared (first use in this function)

When I comment out the line in main.c, it compiles OK.

Sara BEN HADJ YAHYA
ST Employee

Hello,

Could you please share your .ioc file?

Thanks,

Sara.

KKjel.1
Senior

Hi Sara

I attached the .ioc file to the mail.

But let's try if I can attach it here:

br

Kaare

Sara BEN HADJ YAHYA
ST Employee

Hello @Kåre Kjeldsen​ ,

Compilation error when using an STM32H730ZBT

../Core/Src/main.c:156:26: error: 'PWR_DIRECT_SMPS_SUPPLY' undeclared (first use in this function)

This is a known issue and it is already reported to the dev team. Please replace 'PWR_DIRECT_SMPS_SUPPLY' with 'PWR_LDO_SUPPLY', it should compile fine.

Sorry for the inconvenience it may cause,

If you issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

KKjel.1
Senior

Hi Sara

OK, thanks I will do that.

This was actually a secondary problem, to get to the original problem: To create a CubeMX project with FreeRTOS enabled, and import into Rowley CrossStudio.

When creating a CubeMxIDE project, with FreeRTOS support, there is a warning to enable "USE_NEWLIB_REENTRANT". When I do this, I get deep problems with this newlib, when importing into CrossStudio.

If i do not enable it, I get a bit closer to succes, but then I get some errors because <stddef.h> is not included correctly.

Is this issues you know ?

br

Kaare

Sara BEN HADJ YAHYA
ST Employee

Hello @Kåre Kjeldsen​ ,

Could you please share your project?

Thanks,

Sara.

KKjel.1
Senior

Regarding the missing stddef, I can add #include <stddef.h> in the sysmem.c file, and then it compiles.

I am not sure if this file is a file maintained and distributed by ST ?

"USE_NEWLIB_REENTRANT" problem: I have decided to NOT use this define, and I can now compile OK.

br

Kaare

KKjel.1
Senior

Yes, of course