Stefan Rueger 784eda6ff3 Provide terminal config command to set fuses and lock bits
Example:

$ avrdude -c dryrun -p AVR32DA32 -t
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9533 (probably avr32da32)

avrdude> c
config period=t_off # 0
config window=t_off # 0
config sleep=bod_disabled # 0
config active=bod_disabled # 0
config sampfreq=sf_128hz # 0
config lvl=bod_1v9 # 0
config clksel=oschf # 0
config eesave=eex_erased # 0
config rstpincfg=gpio # 0
config crcsel=crc16 # 0
config crcsrc=nocrc # 0b11 = 3
config sut=sut_0ms # 0
config codesize=0 # 0
config bootsize=0 # 0
config key=nolock # 0x5cc5c55c

avrdude> c active= -vv
config active=bod_disabled # 0 (brownout detection disabled)

avrdude> c sleep=3
avrdude warning: (config) assigning a reserved value (0x03) to sleep, check data sheet

avrdude> c -v sleep=
config sleep=0b11 # reserved = 3

avrdude> c sleep=bod_cont

avrdude> c -?
Syntax: config {<opts> | <property>[=<value>]}
Function: Show or change configuration properties of the part
Options:
    -f show value of fuse and lock bit memories as well
    -a output an initialisation script with all possible assignments
    -v increase verbosity, show explanations alongside output
    -h show this help message

Config alone shows all property names and current settings of the part's
hardware configuration in terms of symbolic mnemonics or values. Use

avrdude> config <property>

to show that of <property>. Wildcards or initial strings are permitted (but
not both), in which case all settings of matching properties are displayed.

avrdude> config <property>=

shows all possible values that <property> can take on with the currently
set one being the only that is not commented out. Assignments

avrdude> config <property>=<value>

modify the corresponding fuse or lock bits immediately but will normally only
take effect the next time the part is reset (see the data sheet). Value can
be a valid integer or one of the symbolic mnemonics, if known. Wildcards or
initial strings are permitted for the mnemonic, but an assignment only
happens if both the property and the name can be uniquely resolved.

It is quite possible, as is with direct writing to the underlying fuse and
lock bits, to brick a part, i.e., make it unresponsive to further programming
with the chosen programmer: here be dragons.
2023-05-22 23:18:26 +01:00
2022-11-22 22:38:09 +00:00
2022-11-21 09:41:46 +01:00
2023-05-04 19:18:17 +01:00
2023-03-16 08:53:00 -06:00
2021-12-18 22:32:50 +01:00
2023-05-20 21:16:12 +01:00

AVRDUDE

Build Status

AVRDUDE - AVR Downloader Uploader - is a program for downloading and uploading the on-chip memories of Microchips AVR microcontrollers. It can program the Flash and EEPROM, and where supported by the programming protocol, it can program fuse and lock bits. AVRDUDE also supplies a direct instruction mode allowing one to issue any programming instruction to the AVR chip regardless of whether AVRDUDE implements that specific feature of a particular chip.

AVRDUDE was originally written in 2003 by Brian S. Dean. Since 2006, AVRDUDE has been maintained by Jörg Wunsch, with the help of various contributors.

The latest version of AVRDUDE is always available here:
https://github.com/avrdudes/avrdude

Documentation

Documentation for current and previous releases is on Github Pages.

Getting AVRDUDE for Windows

To get AVRDUDE for Windows, install the latest version from the Releases page.

Alternatively, you may build AVRDUDE yourself from source.

Getting AVRDUDE for Linux

To install AVRDUDE for Linux, install the package avrdude by running the following commands:

sudo apt-get install avrdude

Alternatively, you may build AVRDUDE yourself from source.

Getting AVRDUDE for MacOS

On MacOS, AVRDUDE can be installed through Mac Ports.

Alternatively, you may build AVRDUDE yourself from source.

Using AVRDUDE

AVRDUDE is a command-line application. Run the command avrdude without any arguments for a list of options.

A typical command to program your HEX file into your AVR microcontroller looks like this:

avrdude -c <programmer> -p <part> -U flash:w:<file>:i

For instance, to program an Arduino Uno connected to the serial port COM1 with a HEX file called blink.hex, you would run the following command:

avrdude -c arduino -P COM1 -b 115200 -p atmega328p -D -U flash:w:objs/blink.hex:i

There are many different programmers and options that may be required for the programming to succeed.

For more information, refer to the AVRDUDE documentation.

Description
Languages
C 98.3%
Python 0.4%
Roff 0.4%
Shell 0.2%
Yacc 0.2%
Other 0.2%