The cumulative time for typical user tasks depends on the flash and EEPROM
size of the part. This commit computes a size-normalised time. Lower is
better. This avrbench number still depends on the part, but less so than
the cumulative time of the tasks.
The summary line is put in vertical bars to make creation of markdown
tables easier.
This executes five tests for typical programming tasks:
- Write/verify a "difficult" sketch to flash: two code sections and one
data section separated by "holes" of different sizes
- Dump all flash, eg, to make a backup
- Write/verify a "difficult" eeprom data file with holes
- Dump all eeprom, eg, to make a backup
- Chip erase (bootloaders are expected to page erase flash apart from
the bootloader itself) and spot check whether flash was erased
The reported times are realistic times with overhead of starting avrdude,
resetting the board via DTR/RTS, establishing comms, including erasing the
flash before writing/verifying the sketch and disengaging the chip.
$ test-avrdude -b -d 0 \
-p "u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000" \
-p "u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000"
Testing avrdude version 7.3-20240225 (20788712)
Prepare "u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000" and press 'enter' or 'space' to continue. Press any other key to skip
✅ 2.174 s: flash -U write/verify holes_rjmp_loops_32768B.hex
✅ 1.339 s: flash -U read all flash
✅ 1.415 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
✅ 1.034 s: eeprom -U read all
✅ 1.604 s: chip erase and spot check flash is actually erased
✅ 7.566 s: benchmark for u7.7/weu-jPrac -c urclock -P ch340 -p m328p -b 1000000
Prepare "u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000" and press 'enter' or 'space' to continue. Press any other key to skip
✅ 2.001 s: flash -U write/verify holes_rjmp_loops_32768B.hex
✅ 1.333 s: flash -U read all flash
✅ 1.405 s: eeprom -U write/verify holes_pack_my_box_1024B.hex
✅ 1.029 s: eeprom -U read all
✅ 1.618 s: chip erase and spot check flash is actually erased
✅ 7.386 s: benchmark for u7.7/-eu-jPrac -c urclock -P ch340 -p m328p -b 1000000
Note the benchmark line with the cumulative time for all five tasks
Developer options are added to part names or wildcards by a / suffix
followed by a the option characters. However, some part variant names also
contain a slash, eg, AVR64DB64-E/MR. This commit gives priority to such a
variant name and does not interpret the slash as developer option.
Have the autotools place their m4 files into the auto-m4/
subdir to separate them from our own m4 files.
Not using AC_CONFIG_MACRO_DIRS for backwards compatibility.
Add the GIT_COMMIT_HASH to the version message printed by
"avrdude -?" and in the avrdude.conf avrdude_conf_version line.
So the autotools buildsystem now produces the identical
version message as the cmake buildsystem does.
This m4 quotes many more macro arguments and deals with the
setting of variables.
* Set variable default values to avoid accidental use of
env var values from the caller of the configure script
* rewrap some longer lines
* Remove AC_SUBST([FOO], [$FOO]) type no-ops. AC_SUBST([FOO])
does the same.
Calling AVRDUDE_FULL_VERSION just VERSION in parts of the build
process, and AVRDUDE_FULL_VERSION in others, is unnecessarily confusing.
So call it AVRDUDE_FULL_VERSION everywhere.
Use AM_PROG_AR before LT_INIT to prevent occasional warnings.
AM_PROG_AR was introduced in the 1.11 to 1.12 timeframe,
and we require at least Automake 1.14.
The TIME_WITH_SYS_TIME C preprocessor macro is not found
anywhere in the source tree, so we do not need to define
it after all and can get rid of the obsoletion warning.
Quoting CMakeLists.txt: "[...] of latest commit"
"Latest commit" is better served by using the committer date %cd
instead of the author date %ad: The author date could be some time
last year with committer date being today.
Note this affects both autotools and cmake buildsystems to keep
the generated version message dates and year in sync.
AC_CHECK_LIB([readline], [readline]) without an ACTION-IF-FOUND
results in the definition of the HAVE_LIBREADLINE C preprocessor
macro and the addition of -lreadline to LIBS, not a configure
script environment variable have_readline.
So this repeats what the default ACTION-IF-FOUND does (add
-lreadline to LIBS, AC_DEFINE the HAVE_LIBREADLINE macro),
and in addition defines the have_libreadline variable as
yes for later use inside configure.ac.
As our src/config.c defines a "yywrap" function, there
is no need for AC_PROG_LEX to look for for a "yywrap"
function in LEXLIBS.
Therefore we add the "noyywrap" option to follow the more
modern AC_PROG_LEX invocation.
Require a certain baseline of tool versions, in this case
from around 2013 (autoconf 2.69 and automake 1.14).
This is a significant advancement over the old requirement
of autoconf 2.60 (from 2006) and no requirement on automake
which gives us features without needing a very recent system.
The exact versions to require might be up to debate.
This is just the raw result of running "autoupdate" to update
the src/configure.ac file to a more recent standard.
Manual fixes to the autoupdate output will happen over the next
few commits.
This fixes some of the autoreconf time warnings, e.g. about AC_TRY_*
being used instead of AC_*_IFELSE.
When called from a working directory different from the directory
where the bootstrap script is located, make the bootstrap script
only work on its own directory and not whatever the current working
directory just happens to be.
Let the autoreconf tool handle the sequencing of tool calls.
The autoreconf tool has been dealing with calling tools like
aclocal, libtoolize, etc. quite well for about the last 20 years.
This keeps the "bootstrap" script around to keep the old way
of calling bootstrap working, i.e. maintain compatibility with the
existing workflows.
Move all autotools helper scripts and auxiliary files installed
automatically by the autotools to auto-aux/ (e.g. config.guess,
depcomp, install-sh, texinfo.tex, etc.).
Moving AC_CANONICAL_TARGET after AC_CONFIG_AUX_DIR works
around a silent bug in Autoconf 2.69 where the generated
configure script would not find the install-sh file which
has been placed in that given aux directory.
Moved AM_INIT_AUTOMAKE which must also happen after
AC_CONFIG_AUX_DIR.
This add some basic CI checks which exercise the autotools build:
* make targets "all" "install" testing compilation and installation
* run the same dry-run test-avrdude check as the cmake builds
* make target "distcheck" testing that dist tarball contains all
the necessary files
As libavrdude-avrintel.h uses not only uint32_t and related
types from stdint.h, but also size_t from stddef.h, we also
need to #include the latter into libavrdude.h before
libavrdude.h includes libavrdude-avrintel.h