flash_and_run
Flash an ELF to an STM32 target, halt at the entry point, and receive decoded stop context in one call. Starts a session pinned to a chosen probe when needed.
Instructions
One-call bring-up: flash an ELF (loads symbols), reset-halt, set a temporary breakpoint at an entry point (default 'main'), run to it, and return the decoded stop context. With hub_channel (or usb_location) and no session running, it starts one pinned to that probe first -- so 'flash the firmware on channel 4' is this single call, on a bench with several probes, without disconnecting any of the others.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mcu | No | Passed through when this call starts the session; falls back to the profile. | |
| run_to | No | Entry point to stop at (default 'main'). | |
| session | No | Optional debug-session name. Omit for the default target. | |
| file_path | Yes | Path to the ELF to flash. | |
| hub_channel | No | Start a session on the probe at this hub channel first, if none is running. Uses the usb_location recorded for it in the profile's hub.map. Ignored when a session is already live -- it flashes through that one. | |
| timeout_sec | No | Max seconds to wait (default 10). | |
| usb_location | No | Same, but naming the USB position directly, e.g. '1-1.4'. |