STM32 Template VSCode
It allows to generate a PlatformIO project from STM32CubeMX configuration. It is based on the stm32pio tool. Change board in platformio.ini to your board.
Working principle
It uses STM32CubeMX to generate a HAL library. Then it uses stm32pio to generate a PlatformIO project from the HAL library. It place generated file in lib/cubemx/src and lib/cubemx/inc directories. Original main.c is renamed driver.c in lib/cubemx/src directory.
Just include driver.h in src/main.c and you are ready to go.
Setup
Change:
cubemx_cmd = "Path to STM32CubeMX.exe"to the according path to STM32CubeMX.exeChange:
java_cmd = "Path to STM32CubeMX/jre/bin/java.exe"to the according path to java.exeChange board in
platformio.inito your board.You need stm32pio:
pip install stm32pioFor more details about stm32pio follow:
Instructions
To update config open stm_config.ioc using STM32CubeMX.
In PlatformIO CLI run:
./update_config.sh