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.
1. Create an embedded project
Section titled “1. Create an embedded project”suya project create --name blinky --workspace <workspace-id> --type embeddedsuya repo create --installation <installation-id> # back it with Git2. Create a pin-plan
Section titled “2. Create a pin-plan”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:
# From a supported dev boardsuya arch pin-plan create --board NUCLEO-L433RC-P
# …or from a bare MCU partsuya arch pin-plan create --mcu STM32F407VGTxList and inspect plans:
suya arch pin-plan listsuya arch pin-plan show --plan <plan-id>3. Assign pins and configure peripherals
Section titled “3. Assign pins and configure peripherals”# Pin a signal to a physical pinsuya 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 intentsuya arch clock set --plan <plan-id> ...
# Every assignment has an inverse — use it when a pin moves or was mistypedsuya arch pin rm --plan <plan-id> --pin PA5suya arch peripheral rm --plan <plan-id> --peripheral USART2suya arch clock rm --plan <plan-id> --node SYSCLKsuya arch pin-plan rm --plan <plan-id> # delete the whole plan4. Validate
Section titled “4. Validate”suya arch validate --plan <plan-id>This runs a structural validation; the headless CubeMX engine on the backend is the authoritative check.
5. Generate and commit the .ioc
Section titled “5. Generate and commit the .ioc”suya arch generate --plan <plan-id> --wait # run headless CubeMX, print the resolved .iocsuya arch generate-status --run <run-id> # poll a run started without --waitsuya arch ioc commit # generate + commit the .ioc to the connected repoWithout --wait, generate enqueues the run and returns a run id to poll with
generate-status. Check status before trusting the result: resolved means the
headless CubeMX engine actually ran; unresolved means it did not — the .ioc is
your intent, not an engine-validated artifact — and reason says why, most often
that no CubeMX image is baked yet for that MCU family.
The .ioc lands in your GitHub repo, ready to open in STM32CubeMX or drive further
code generation.
Review the plan
Section titled “Review the plan”Render the plan into a review document and run it through review like any other design artifact:
suya arch pin-plan review-doc --plan <plan-id>suya review create <document-id>Next steps
Section titled “Next steps”- Tools & CubeMX — how cloud toolchains and CubeMX are wired.
- CLI: arch — the full
suya archreference.