Skip to content

STM32 getting started

This is the embedded counterpart to the Quickstart: a full worked example that takes a fresh embedded project to a generated STM32 .ioc (the CubeMX project file) committed to your repo. It uses Subaya’s pin-planning surface (suya arch), which is backed by a headless CubeMX engine in the cloud.

You don’t need CubeMX installed locally — the authoritative validation and code generation run on Subaya’s backend.

Terminal window
suya project create --name blinky --workspace <workspace-id> --type embedded
suya repo create --installation <installation-id> # back it with Git

A pin-plan captures the MCU/board, pin assignments, peripheral configs, and clock-tree intent. Start it from a dev board (the board contract gives you the LED, button, and virtual-COM-port pins for free) or from a bare MCU part:

Terminal window
# From a supported dev board
suya arch pin-plan create --board NUCLEO-L433RC-P
# …or from a bare MCU part
suya arch pin-plan create --mcu STM32F407VGTx

List and inspect plans:

Terminal window
suya arch pin-plan list
suya arch pin-plan show --plan <plan-id>
Terminal window
# Pin a signal to a physical pin
suya arch pin set --plan <plan-id> --pin PA5 --signal GPIO_Output --label LED
# Configure a peripheral (mode + params)
suya arch peripheral configure --plan <plan-id> --peripheral USART2 --mode Asynchronous
# Express clock-tree intent
suya arch clock set --plan <plan-id> ...
Terminal window
suya arch validate --plan <plan-id>

This runs a structural validation; the headless CubeMX engine on the backend is the authoritative check.

Terminal window
suya arch generate --plan <plan-id> # produce the .ioc from the pin-plan
suya arch ioc commit # generate + commit the .ioc to the connected repo

The .ioc lands in your GitHub repo, ready to open in STM32CubeMX or drive further code generation.

Render the plan into a review document and run it through review like any other design artifact:

Terminal window
suya arch pin-plan review-doc --plan <plan-id>
suya review create <document-id>