Burn firmware config to board
flash_configWrites a firmware configuration to a connected CyberBrick board, overwriting stored settings for exactly one target device; supports saved project flashing via hardware mappings.
Instructions
Write a firmwareConfig to the board. Default: the app's SET_DEVICE_CONFIG file protocol (FILE_INFO(md5,size) → chunked FILE_BLOCK via sendGetMessage) — works for a lone receiver, burns firmwareConfig if given else the current editor config, to exactly one target device (ambiguous or unmatched targets are refused). The device must be connected (else DEVICE_NOT_CONNECTED → call connect_bluetooth). Returns {ok, verified, bytes, chunkSize, blocks, md5, readback} — verified=true when the board reports the written size — or {stage, ...} on failure. Passing hardwareMappings switches to the app's runSendConfigTask (burns a saved project, needs a sender board; never creates a project). That path can also upgrade firmware / MPY / loader first — preview with flash_check and pass confirm=true only after the user approved those upgrades. Executes immediately — OVERWRITES the board's stored config. MUTATING / writes to hardware.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Which device to target — pass exactly one field. If omitted, the app must know exactly one device; ambiguous or unmatched targets are refused. | |
| confirm | No | runSendConfigTask path only, required true: set only after the user approved the upgrades flash_check reports. | |
| firmwareConfig | No | Config object to burn (defaults to the current editor config). File-protocol path only. | |
| firmwareListId | No | runSendConfigTask path only: saved project id to burn (defaults to the editor's current config id; must exist in project_list). | |
| hardwareMappings | No | Opt into the high-level runSendConfigTask path (requires a sender board). |