Skip to content

avrdude benchmark for Flash and EEPROM programming

Stefan Rueger edited this page Feb 28, 2024 · 25 revisions

To be updated.

Methodolody

tools/test-avrdude -b generates an output for which benchmark tables can be filtered. For example,

tools/test-avrdude -b -d 0 \
 -p "-c urclock -P COM20 -p ATmega328P -b 2000000" \
 -p "-c urclock -P COM20 -p ATmega328P -b 1000000" \
 -p "-c urclock -P COM20 -p ATmega328P -b 500000" \
 -p "-c urclock -P COM20 -p ATmega328P -b 250000" \
 -p "-c urclock -P COM20 -p ATmega328P -b 115200" >/tmp/benchmarks

grep '^|' /tmp/benchmarks

to see just the table

Results

The benchmark shows the wall clock time of avrdude carrying out the following tasks

  • Fl-ewv: erase flash, then write a sketch with three sections separated by holes to flash and verify
  • Fl-r: read the full flash memory and write to file
  • EE-wv: write data with two data sections separated by a hole to EEPROM and verify
  • EE-r: read the full EEPROM memory and write to file

The sketch and data payload is roughly one sixth of the respective memory size

  1. The following is with avrdude MSVC64 binary, Arduino Uno Rev 3 clone using ATmega16U2 as the USB to Serial chip
-c pgm -p part Fl-ewv Fl-r EE-wv EE-r Comments
urclock ATmega328P 1.73 s 0.62 s 1.25 s 0.45 s -b 2000000 urboot u7.7 -eu-jPrac
urclock ATmega328P 1.79 s 0.80 s 1.25 s 0.46 s -b 1000000 urboot u7.7 -eu-jPrac
urclock ATmega328P 1.92 s 1.15 s 1.25 s 0.50 s -b 500000 urboot u7.7 -eu-jPrac
urclock ATmega328P 2.17 s 1.86 s 1.28 s 0.58 s -b 250000 urboot u7.7 -eu-jPrac
urclock ATmega328P 2.76 s 3.49 s 1.34 s 0.81 s -b 115200 urboot u7.7 -eu-jPrac
  1. The following is with avrdude MSVC64 binary, usbasp
-c pgm -p part Fl-ewv Fl-r EE-wv EE-r Comments
usbasp ATmega328P 2.53 s 5.43 s 3.03 s 0.69 s -B 0.25
usbasp ATmega328P 2.49 s 5.40 s 3.03 s 0.64 s -B 0.5
usbasp ATmega328P 3.10 s 6.72 s 3.03 s 0.68 s -B 1
usbasp ATmega328P 3.81 s 8.77 s 3.10 s 0.78 s -B 2
usbasp ATmega328P 4.80 s 9.82 s 3.12 s 0.85 s -B 4

Clone this wiki locally