PlatformIO Community

Using STM32CubeMX and PlatformIO

Since the STM32CubeIDE uses the same CubeMX implementation this should be possible as long as the same .cproject file for eclipse is generated.

But if this is not the case, then creating the same CubeMX information with STM32CubeIDE should still be possible.

Cheers, Joachim

1 Like

A missing puzzle piece to this may also be The current STM32Cube HAL is very much out of date and results in compilation error some times. I have generated a new version of framework-stm32cube with the very-latest versions (built through a script), but it needs testing, see issue. @valeros if you see this, please consider updating with the tool I posted in the issue :smiley:

Ok, I didn’t know that the libraries provided by Platformio are so outdated. My experiments focused on STM32F4 boards and these seem to be not as badly out of sync as the rest…

I now created a new script that extracts as much information from the .project and .cproject file as possible, turns off as much of the additional “intelligence” of platformio as manageable, and then lets it build with only the libraries provided by CubeMX.

Caveat: You must create you project with the option “Add necessary files as reference in the toolchain project configuration file” because this is the only way my script can extract the needed information.

Here is the link to the script:

Looking forward to your comments/feedback.

Cheers, Joachim

1 Like

(yeah, old thread, I know, but it highlights the issues involved to get this working …)

I can’t figure out how to make PIO + FreeRTOS + LwIP play nice together on STM32. There’s a makefile-based version which works out of the box on github (effortlessly!), but every attempt to bring it into PIO’s world has failed me so far (FWIW, I’d rather not go through the STM32Cube code generator, which leads to unmaintainable code).

I’ve tried using the FreeRTOS / LwIP libs inside .platformio (fails to compile) and I’ve tried mincrmatt12’s PIO repos (see 6696, 6751, and github, after adapting them from F2 to F7).

So far, it’s a bit like herding cats. If there’s a working example of running PIO + FreeRTOS + LwIP on any STM32 board, I’d love to hear about it …