Avrdude
From Attie's Wiki
For detailed info:
$ man avrdude
Contents |
See Also
Useful Lines
For using the Arduino bootloader
$ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex $ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i
For using the buspirate
$ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex $ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i
Parameters
Parameters marked with a * are required.
* Programmer Type
-
-c buspirate
- for use with the buspirate -
-c stk500v1
- for use with the Arduino bootloader - other (see the man page)
* Programmer Port
-
-P /dev/ttyUSB1
- the most likely for my systems
* Part Identifier
-
-p m168
- for use with an ATMega168 -
-p m328p
- for use with an ATMega328p -
-p m1280
- for use with an ATMega1280
* Burn Counter
Not technically required, but a good idea. The burn counter is stored in the last 4 bytes of eeprom
-
-y
- to increment the burn counter each burn -
-Y value
- to initialise the burn counter
Baud Rate
Required for stk500v1
-
-b 57600
- for most of mine
Terminal Mode
-
-t
- see #terminal_mode for mode
Memory Access
There are others, but these are the most common
-
-U flash:operation:filename[:format]
- where the firmware lives -
-U eeprom:operation:filename[:format]
- non-volatile memory -
-U lfuse:operation:filename[:format]
- low fuse byte -
-U hfuse:operation:filename[:format]
- high fuse byte -
-U efuse:operation:filename[:format]
- extended fuse byte
operation
can be:
-
r
- read -
w
- write -
v
- verify
filename
points to the file to use
format
can be:
-
a
or omitted - for auto-detection -
i
- Intel Hex (output from obj-dump) -
r
- Raw binary - other (see the man page)
Terminal Mode Commands
dump
-
dump memtype address nBytes
- dump nBytes from address in hex and ASCII -
dump
- continue for another nBytes
write
-
write memtype address byte1 ... byteN
- write to memory by hand, currently doesn't work with flash :(
parm
-
part
- display information on the connected part