[ANNOUNCE] stm32bridge: migrate STM32CubeMX → PlatformIO in one command (no GPDSC)

TL;DR: With CubeMX 6.6 removing GPDSC and CubeMX launched from CubeIDE often locking the Toolchain/IDE selector, the old stm32pio flow broke. stm32bridge converts a CubeMX project to a working PlatformIO project (HAL via PlatformIO), generates a correct platformio.ini, and optionally carries FreeRTOS and a custom board. One command, predictable result.

Repo: https://github.com/Jobenas/stm32bridge
Blog (context + walkthrough): https://jobenas.medium.com/building-a-toolchain-bridge-lessons-from-stm32bridge-9aa209694cce


Why this exists

  • CubeMX 6.6 removed GPDSC export, which stm32pio relied on.

  • Opening CubeMX from inside CubeIDE often disables the Toolchain/IDE dropdown (CubeIDE-only).

  • Manual copy of Core/*, Drivers/*, etc. into PIO is doable, but fragile and repetitive.

stm32bridge aims to make this migration deterministic and repeatable.


What it does

  • Normalizes layout (CubeMX → PIO src/, include/, etc.)

  • Writes platformio.ini with the right framework/defines/includes

  • FreeRTOS: migrate middleware or use framework’s packaged RTOS (flags available)

  • Analyzer: shows CPU/FPU/ABI, HAL defines, family, RTOS usage before you migrate

  • Custom board generator: create boards/<your_board>.json from URL/PDF or manual input

Uses PlatformIO’s packaged HAL; your CubeMX configuration is preserved.

Quick start

# Install
pipx install stm32bridge     # or: pip install --user stm32bridge

# 1) (Optional) Inspect a CubeMX project
stm32bridge analyze ./MyCubeMX

# 2) (Optional) Generate a custom board
stm32bridge generate-board generic_stm32l433 \
  --source <url-or-pdf> --output .

# 3) Migrate to PlatformIO (and build)
stm32bridge migrate ./MyCubeMX ./MyPIO \
  --board generic_stm32l433 --build

Heads-up: If the Toolchain/IDE dropdown is disabled in CubeMX, open standalone CubeMX (not via CubeIDE) and choose Makefile export before generating code.

Compatibility notes

  • Works with CubeMX projects where code was generated with Makefile (no GPDSC needed).

  • Keeps your stm32xx_hal_conf.h and relevant CMSIS/HAL includes aligned to PIO.

  • You can skip or use framework FreeRTOS via flags.

Feedback & issues

I’d love feedback from the community, edge cases, boards to test, or PRs.
Open an issue here: https://github.com/Jobenas/stm32bridge/issues