Skip to content
mcuee edited this page May 26, 2025 · 34 revisions

FAQ for avrdude

Please refer to the following Wiki page about the known limitations

https://github.com/avrdudes/avrdude/wiki/Known-limitations-of-avrdude

Please also refer to the avrdude documentation here.

https://avrdudes.github.io/avrdude/

How to report an issue to avrdude project?

  1. Create a separate issue for each problem
  2. Tell us what exactly the problem is and how you came to experience it
  • OS
  • Programmer
  • Part
  • How host, programmer and part are connected/rigged up
  • AVRDUDE binary version used (in bash avrdude -v 2>&1 | grep -i version)
  • Full command line including all options
  • Output of the command
  • Please try to use the latest released version
  • You may be requested to try out git main as well
  • What you would have expected to happen
  • Sometimes it also helps us if you upload the hex file used (if you are okay to share the hex file)
  • It also helps us if you upload a file with the -vv or -vvvv output. Capture the full debug output using -l debug.log and upload the debug.log file. Alternatively, cut and paste the complete debug log into the issue comment box using the details markup and three-backticks section for literal display like so:
<details>
<summary> My optional headline </summary>

```
Cut and paste the full log
```

</details>

I do not want to build from source, where can I get the binaries for git main?

Latest binary snapshots are linked here, for Linux, macOS and Windows. https://github.com/avrdudes/avrdude/wiki/Getting-Nightly-Builds-for-AVRDUDE

I am new to avrdude and I do not have a programmer, what are the recommended programmers to be used with avrdude?

avrdude supports many programmers. Here are some examples of low cost and well-supported programmers.

  1. usbasp, usbtinyisp, stk500v2 clones, AVRISPmkII clones, etc, for classic AVRs
  2. AVRISP mkII clones also support xMega AVRs
  3. serialupdi for new UPDI parts; jtag2updi can be used as well but it does not support newer UPDI parts.
  4. If you prefer official tools from Microchip, then SNAP is also well supported. PICKit 4 is also well supported but it is more expensive and considered EOL by Microchip.

I have got the programmer working. Now I want to try using bootloader. Which bootloader should I use?

Survey of AVR bootloaders:

We recommend urboot for classic AVR chips.

For xmega, you may want to try xboot (AVR109 based)

For UPDI parts, you may want to try optiboot_x and optiboot_dx.

If you use USB AVRs, you may want to try Caterina (AVR109 based) or FLIP1/FLIP2 (Atmel extension to USB DFU).

Which USB to Serial chips are recommended?

As long as your USB to Serial chips are supported by the OS, they should work with avrdude. Typically the default baud rate for most programmers is 115200. 500K baud or lower are typically a good one to use if you want to go with high speed if the programmer or bootloader supports it. 1M baud or 2M baud may work as well for some programmers/bootloaders.

Notes:

  • FTDI FT232RL -- you may want to change the latency timer from the default 16ms to 1ms. The chip supports up to 3M baud.
  • FTDI FT232H/FT2232H -- you may want to the latency timer from the default 16ms to 1ms. The chip supports up to 12M baud.
  • Silabs CP2102 or similar -- the max supported baud rate is 921600.
  • Silabs CP2102N -- the max supported baud rate is 3M baud.
  • WCH CH340 -- the max supported baud rate recommended by WCH is 500k dual direction. 1M baud will usually work but 2M baud has been known to not work reliably.
  • WCH CH343 -- the max supported baud rate recommended by WCH is 3Mbps and HW flow control is required.
  • Holtek HT42B534 -- the chip supports up to 3M baud
  • Prolific PL2303TA/HXD/GS/GC/GE -- the chip supports up to 12M baud. Older version of PL2303 chip like PL2303HXA/XA are obsoleted and may not work under Windows, so it is better to avoid them.
  • Microchip MCP2200 -- the max supported baud rate is 1M baud
  • Maxlinear XR21B1420 -- the max supported baud rate is 3M baud
  • Infineon (Cypress) CY7C65213/213A1 CY7C65223/D -- the max supported baud rate is 3M baud

It is also good to get USB to TTL adapters which have DTR and/or RTS pin if you work with bootloaders like urboot, Optiboot or Wiring.

How to change the latency timer of FTDI USB to Serial chips (eg: FT232RL, FT232H, FT2232H) from the default 16ms to 1ms?

Under Windows, go to Device Manager "Ports (COM & LPT)" and find the corresponding USB to Serial Port, in the "Advance Settings", change the latency timer value from 16ms to 1ms.

More details with screenshots. https://github.com/avrdudes/avrdude/discussions/1022#discussioncomment-8576777

For Linux, run with the root permission.

cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer
echo 1 > /sys/bus/usb-serial/devices/ttyUSB0/latency_timer

Note: .Replace ttyUSB0 with the right port for your system).

How to read the fuse/configuration settings with avrdude 7.0 and later?

If you want to do more, try "terminal mode" (-t). You can browse around interactively through your device, including the fuse values. Non-interactively, it would need -U options, like:

avrdude … -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h

avrdude version 7.2 and later.

C:\work\avr\avrdude_bin> .\avrdude.exe -C .\avrdude.conf -c usbasp -p m328p -T config
config sut_cksel=intrcosc_8mhz_6ck_14ck_65ms # 34
config ckout=co_disabled # 1
config ckdiv8=by_8 # 0
config bootrst=application # 1
config bootsz=bs_256w # 3
config eesave=ee_preserved # 0
config wdton=wdt_programmable # 1
config spien=isp_enabled # 0
config dwen=dw_off # 1
config rstdisbl=external_reset # 1
config bodlevel=bod_2v7 # 5
config lb=no_lock # 3
config blb0=no_lock_in_app # 3
config blb1=no_lock_in_boot # 3

Avrdude done.  Thank you.

optiboot timeout too fast, how to use it effectively in terminal mode?

You can use piping.

echo "dump eeprom 0 0x10" | .\avrdude_pr1121v1 -c arduino -P COM4 -b 115200 -t

How to write write all or some ELF sections at once?

Please refer to the above issue for the ways to write all ELF sections at once. Step 1: to check the unique memory sections.

avrdude `avrdude -pATmega328p/At | grep ^.ptmm.A | cut -f3 | uniq | sed "s/.*/-U &:w:blink.elf:a/"`

Or

$ avrdude -pm32u4/ot|grep write|cut -f3|uniq
eeprom
flash
lfuse
hfuse
efuse
lock

Step 2: to write the avrdude command based on the output of Step 1.

avrdude -v -pm32u4 -cusbasp -U{eeprom,flash,{l,h,e}fuse,lock}:w:"$1":e "${@:2}"

Flashing boards like Arduino Leonardo can be tricky

Please refer to the following discussion for the tips under different OS.

PR #1507 has been merged to address this issue. It has been included in avrdude 7.3 release. Take note you need to use MSYS2 mingw binaries with libserialport support under Windows.

New version 3.8 drivers for CH340 under Windows may cause troubles, please downgrade to version 3.5

Please refer to the following issue. It has the driver attached as well.

CH340 based serialupdi programmers does not work under FreeBSD due to the driver limitation (Still an issue in FreeBSD 14).

How to troubleshooting a potential programming issue?

The following is a good example for jtag2updi.

I have the official STK500 board, shall I run V1 FW or V2 FW?

It is strongly recommended that you upgrade to V2 FW. Some of the classic AVR chips may not be supported by V1 FW (eg: ATmega32U4).

How do I build avrdude Python binding and GUI under Linux?

Example for Ubuntu 24.04, on top of the normal avrdude build instructions.

 sudo apt install python3-venv python3-pip
 python3 -m venv py312venv
 . ./py312venv/bin/activate
 pip install pyside6
 cd avrdude (avrdude local directory)
 ./build.sh
 sudo cmake --build build_linux --target install
 avrdude-gui

Example for Fedora 42, on top of the normal avrdude build instructions.

  sudo dnf install  python3-devel python3-pip swig
  mkdir build
  cd build/
  git clone https://github.com/avrdudes/avrdude.git
  python3 -m venv py313venv
  . ./py313venv/bin/activate
  cd avrdude/
  pip install pyside6
  ./build.sh 
  sudo cmake --build build_linux --target install
  avrdude-gui 

How do I build avrdude Python binding and GUI under Windows with Visual Studio?

Please refer to this comment. https://github.com/avrdudes/avrdude/pull/1971#issuecomment-2803650696

My Microchip tools cannot program a new AVR part, what can I do?

You may need to check the FW version of your Microchip tools. You may need to go to Microchip MPLABX to update the FW. Example:

I have some strange display related problems with Windows Terminal, what should I do?

Indeed Windows Terminal can be too smart to create issues, you may want to use Windows Console Host as the default terminal applications to handle Command Line applications. Please still report the issues and the avrdude project will see if it is possible to work around the issue or not.

Reference:

Clone this wiki locally