Skip to main content
KKjel.1
Senior
January 5, 2022
Solved

How to: CubeMX + FreeRTOS + CrossStudio

  • January 5, 2022
  • 9 replies
  • 2887 views

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

This topic has been closed for replies.
Best answer by Sara BEN HADJ YAHYA

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.

9 replies

Sara BEN HADJ YAHYA
Technical Moderator
January 5, 2022

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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
KKjel.1
KKjel.1Author
Senior
January 5, 2022

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
Technical Moderator
January 5, 2022

Hello,

Could you please share your .ioc file?

Thanks,

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
KKjel.1
KKjel.1Author
Senior
January 5, 2022

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
Technical Moderator
January 6, 2022

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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Sara BEN HADJ YAHYA
Technical Moderator
March 8, 2022

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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
KKjel.1
KKjel.1Author
Senior
January 6, 2022

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
Technical Moderator
January 7, 2022

Hello @Kåre Kjeldsen​ ,

Could you please share your project?

Thanks,

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
KKjel.1
KKjel.1Author
Senior
January 7, 2022

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
KKjel.1Author
Senior
January 7, 2022

Yes, of course

Sara BEN HADJ YAHYA
Technical Moderator
January 11, 2022

Hello @Kåre Kjeldsen​ ,

I couldn't reproduce the issue so I advise you to use one of CubeMX supported Toolchains (CubeIDE, EWARM, MDK ARM), it is more guaranteed.

Sara.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.