build_firmware
Rebuild STM32 firmware via Keil, CMake, make, or a custom command, returning exit status, success flag, and build log tail so AI agents can verify fixes.
Instructions
Builds firmware with Keil uVision (UV4), CMake, make, or a custom command, so the AI can rebuild after a fix. Keil emits a .axf (ELF/DWARF) that the debug tools load like any .elf. Returns the exit code, success flag, and build log tail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the build. | |
| kind | Yes | Toolchain to build with. | |
| config | No | cmake: build config, e.g. Debug/Release. | |
| target | No | Keil/CMake/make build target. | |
| command | No | custom: full argv to run. | |
| project | No | keil: path to the .uvprojx/.uvproj project. | |
| rebuild | No | keil: rebuild all (-r) instead of incremental (-b). | |
| session | No | Optional debug-session name. Omit for the default target. | |
| uv4_path | No | keil: path to UV4.exe (auto-detected if omitted). | |
| build_dir | No | cmake: the configured build directory. | |
| directory | No | make: directory containing the Makefile. | |
| timeout_sec | No | Max build seconds (default 600). |