build_and_flash
Build a project with make and program the resulting hex file to the target device, performing erase, write, verify, and release operations.
Instructions
Build a project with make and flash the result to the target device.
project_dir: path to the directory containing the Makefile. Falls back to the PYMCUPROG_PROJECT_DIR environment variable if not provided. Runs 'make -C project_dir', finds the generated .hex file, then erases, writes, verifies, and releases the target. Returns 'OK' on success; raises with build output on compile failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_dir | No | ||
| device | No | ||
| tool | No | ||
| serialnumber | No | ||
| serialport | No | ||
| baudrate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |