Hans a245cd5370 Use -xmode to switch PICkit4 and SNAP application modes (#1596)
* Use libusb to switch a PICkit4 or SNAP to AVR mode

* Fix case

* implement -xmode=pic
Thanks Wireshark

* Print PIC switch info messages

* Fix typo

* Rename SNAP and PICkit4 USB PID

* Make it possible to enter avr mode even when the tool is in bootloader/recovery mode

* Add -xmode to docs

* Tweak grammar

* Add -xmode support for pickit4_isp and snap_isp
still need to figure out how to actually trigger the mode switch form stk500v2.c

* Don't print "unable to open port" error on pgm->open softfail

* Add const

* Simplify SNAP/PICkit4 mode switching code

* Formatting

* Add extra argument to jtag3_open_common
This makes it possible to switch SNAP/PK4 modes from stk500v2.c as well, using pickit4_isp and snap_isp

* Improve extended parameter parsing

* Improve error message

* Improve extended parameter parsing

* Immediately exit after a mode switch

* Remove unnecessary line

* Add missing serial_close

* Remove unnecessary else

* Minor code tweaks

* Update docs

* Formatting

* Improve external parameter parsing and error handling

* Remove unused parameter
2024-01-04 02:02:24 +13:00
2022-11-22 22:38:09 +00:00
2022-11-21 09:41:46 +01:00
2021-12-18 22:32:50 +01:00
2023-12-18 14:13:36 +13: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.4%
Python 0.4%
Roff 0.4%
Shell 0.2%
Yacc 0.1%
Other 0.3%