@@ -45,20 +45,22 @@ Mcbootflash can be used as both a command-line application and a library.
4545
4646``` shellsession
4747$ mcbootflash --help
48- usage: mcbootflash [-h] -p PORT -b BAUDRATE [-t TIMEOUT] [-v] [-q] [--version] hexfile
48+ usage: mcbootflash [-h] -p PORT -b BAUDRATE [-t TIMEOUT] [-c] [-r] [- v] [-q] [--version] hexfile
4949
5050Flash firmware over serial connection to a device running Microchip's 16-bit bootloader.
5151
5252positional arguments:
53- hexfile an Intel HEX file containing application firmware
53+ hexfile a HEX file containing application firmware
5454
55- optional arguments :
55+ options :
5656 -h, --help show this help message and exit
5757 -p PORT, --port PORT serial port connected to the device you want to flash
5858 -b BAUDRATE, --baudrate BAUDRATE
5959 symbol rate of device's serial bus
6060 -t TIMEOUT, --timeout TIMEOUT
6161 try to read data from the bus for this many seconds before giving up
62+ -c, --checksum verify flashed data by checksumming after write
63+ -r, --reset reset device after flashing is complete
6264 -v, --verbose print debug messages
6365 -q, --quiet suppress output
6466 --version show program's version number and exit
@@ -69,10 +71,8 @@ optional arguments:
6971``` shellsession
7072$ mcbootflash --port /dev/ttyUSB0 --baudrate 460800 firmware.hex
7173Connecting to bootloader...
72- Connected
73- Existing application detected, erasing...
74- Application erased
75- Flashing firmware.hex
74+ Erasing program area...
75+ Flashing firmware.hex...
7676100% 88.7 KiB |########################################| Elapsed Time: 0:00:05
7777Self verify OK
7878```
@@ -100,8 +100,7 @@ for chunk in chunks:
100100 bf.write_flash(connection, chunk)
101101
102102 # Optionally, check that the write is OK by checksumming.
103- if bootattrs.has_checksum:
104- bf.checksum(connection, chunk)
103+ bf.checksum(connection, chunk)
105104
106105 # At this point, you may want to give an indication of the flashing progress,
107106 # like updating a progress bar.
0 commit comments