avr-updi - communicate with an AVR microcontroller over UPDI
$ avr-updi [--port PORT] [--part PART] COMMAND ARGS...
This program contains a number of sub-commands for interacting with an AVR microcontroller using a UPDI interface.
Optional. Provides the USB device where the UPDI adapter is connected. If absent a default of /dev/ttyUSB0 will apply.
Required. Gives the name of the ATmega or ATtiny chip that is expected. Parts may be specified in the following ways:
ATmega4809 atmega4809 m4809 ATtiny814 attiny814 t814
Specifically, these are the same forms as recognised by avr-gcc's -mmcu option and avrdude's -p option, for convenience in Makefiles and build scripts.
-mmcu
-p
Optional. Sets a different baud rate for communications. If not supplied, will default to 115200.
If communications are unreliable, try setting a slower speed.
Send the CHIPERASE key as well as the NVMPROG key when enabling programming for the write-fuses operation. Normally this flag is not required when writing fuses to a newly-programmed chip, but may be necessary to recover from a bad checksum or bad fuse value.
write-fuses
Files read from or written to will be in raw binary format, instead of Intel hex.
Sends a reset request.
$ avr-updi reset
Note that this command does not need the --part to be specified.
--part
Reads from the flash portion of non-volatile memory ("NVM").
$ avr-updi read-flash -p t814 flash-save.hex
Writes to the flash portion of non-volatile memory ("NVM").
$ avr-updi write-flash -p t814 firmware.hex
Reads from the EEPROM portion of non-volatile memory ("NVM").
$ avr-updi read-eeprom -p t814 eeprom-save.hex
Writes to the EEPROM portion of non-volatile memory ("NVM").
$ avr-updi write-eeprom -p t814 data.hex
Reads fuse values.
$ avr-updi read-fuses -p t814 WDTCFG : 00 BODCFG : 00 OSCCFG : 02 TCD0CFG : 00 SYSCFG0 : F6 SYSCFG1 : 07 APPEND : 00 BOOTEND : 00
Writes fuse values.
$ avr-updi write-fuses -p t814 BODCFG=02
Paul Evans <leonerd@leonerd.org.uk>
To install Device::AVR::UPDI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::AVR::UPDI
CPAN shell
perl -MCPAN -e shell install Device::AVR::UPDI
For more information on module installation, please visit the detailed CPAN module installation guide.