f4c5a8350d
This commit replaces fixed-string buffers in PROGRAMMER, AVRPART and AVRMEM that are dealt with by the parser and grammar. Now, string assignments are always to const char *, ie, these are read-only strings with arbitrary length. config_gram.y now only needs to consider one type of string assignment. This commit also - Replaces the simple linear-search cache_string() function with faster hashed cache_string(). Either way, the returned value is likely to be shared, so should never be free()'d. - Duplicates hvupdi_support list in pgm_dup() and frees it in pgm_free() - Adds const qualifier to some function args in avrpart.c and pgm.c - Hardens some functions against being called with NULL pointers - Ensures _new() and _dup() functions for parts, programmers and memory return a suitable memory. Out of memory triggers exit in one of three functions, cfg_malloc(), cfg_realloc() and cfg_strdup(); there is rarely anything useful that AVRDUDE or, for that matter, any application compiled against libavrdude can do once you run out of memory as AVRDUDE/libavrdude rely heavily on allocation of memory. |
||
---|---|---|
.github/workflows | ||
atmel-docs | ||
src | ||
tools | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
CMakeLists.txt | ||
COPYING | ||
INSTALL | ||
NEWS | ||
README.md | ||
build.sh |
README.md
AVRDUDE
AVRDUDE - AVR Downloader Uploader - is a program for downloading and uploading the on-chip memories of Microchip’s 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.