write_hex
Programs a microcontroller with firmware from an Intel HEX file. Optionally erases the chip first and verifies the written memory.
Instructions
Write an Intel HEX file to the target device.
hexfile: absolute path to the .hex file on disk. erase_first: if True, performs a chip erase before writing. Default: False. verify_after: if True, reads back and verifies all written memory. Default: True. Returns 'OK' on success, raises an error if programming or verification fails. For the common case of a full firmware update, prefer the flash tool instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hexfile | Yes | ||
| erase_first | No | ||
| verify_after | No | ||
| device | No | ||
| tool | No | ||
| serialnumber | No | ||
| serialport | No | ||
| baudrate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |