tk3-flash(1) Manual Page
NAME
tk3-flash - microcontroller flashing utility
SYNOPSIS
tk3-flash [-h|--help] [-v|--version]
tk3-flash [-i|--init] [-u|--update] [-d|--delay ms] [-k|--no-reset] flash device program
tk3-flash [-d|--delay ms] [-k|--no-reset] set device [key value …]
DESCRIPTION
tk3-flash is a command-line utility used to update the program stored in permanent memory of microcontrollers. Currently, it supports only programming the AVR microcontrollers with the Mikrokopter bootloader.
tk3-flash supports flashing the EEPROM or the flash memory. It also allows to set parameters specific to the flashed program, without the need for changing the program itself.
OPTIONS
- -i, --init
-
Reinitialize the parameters of the flashed program to their default values, as defined in the
.eeprom
section of the program. - -u, --update
-
Merge existing settings with any newly added or removed settings in the
.eeprom
section of the program. - -d, --delay ms
-
Set the delay between writes in milliseconds. Used on some devices that hang if written too quickly.
- -k, --no-reset
-
Do not reset the board after succesful completion of the flash or set command.
- -v, --version
-
Display the version number of tk3-flash.
- -h, --help
-
Print usage summary and exit.
FLASHING MODE
This mode is invoked by using the flash keyword as the first argument. It
updates the in-memory program of the microcontroller from the ELF image stored
in program. The special name - (a single dash) reads the ELF image from the
standard input instead. The microcontroller is expected to be connected to the
serial line device (typically /dev/ttyS*
or /dev/ttyUSB*
).
The microcontroller should be powered up only after running tk3-flash, so that it can be put in programming mode at boot time.
When flashing a device for the first time, the -i argument must be used in
order to initialize the EEPROM
with default values stored in the .eeprom
section of the program file. Further flashing operations do not require the
-i option, and parameter settings are not be modified (they retain the
values they had before flashing). If the new program contains a different set
of settings, option -u can be used to retain the value of parameters whose
name did not change between the old and new versions of the program.
After a successful operation, tk3-flash reports the current parameter
settings, as stored in the microcontroller EEPROM
.
PARAMETER SETTING MODE
This mode is invoked by using the set keyword as the first argument. The microcontroller must be connected to the serial line device, as for the flashing mode.
When invoked with no additional argument than the device name, tk3-flash
set merely prints the current parameter values on standard output, in the
form of a "key: value (description)
" list.
When invoked with key value arguments, tk3-flash set updates the value of the corresponding parameters. key must be one of the existing parameters (as reported by tk3-flash set). Any number of key, value pairs can be specified on the command line.
After a successful operation, tk3-flash reports the current parameter
settings, as stored in the microcontroller EEPROM
.