There is an official port for the STM32 Nucleo and Discovery boards running inside the Arduino IDE using the Arduino framework.
https://community.st.com/community/stm32-community/blog/2017/07/13/stm32-cores-enabled-in-arduino-ide
It would be great if you can integrate it in PlatformIO
Here the GitHub site: GitHub - stm32duino/Arduino_Core_STM32: STM32 core support for Arduino
Thanks for a feature request
Iβm adding +1 to this feature request. I have recently got Nucleo board and we are going to build our own HW based on STM32 MCU and as I truly love PlatformIO and quite hate Arduino IDE I would be thrilled to have arduino framework available for STM32 within PIO. Thanks.
Itβs an old thread but let me add my voice to the merry throng. I have an STM32 Nano with stm32f303k8 that I would like to program with Arduino framework. Currently I have to use mbed, which I am having a lot of problems coming to grip with.
I found this link for Arduino ide that allows the board (and many others) to be programmed in Arduino ide, so maybe you could use it.
Cheers, Ian
https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
We have a feature request for that: