When serving a vector bootloader, both -c urclock and now -c dryboot used
to protect two vectors in the vector table, the reset vector and the
dedicated vector to jump to the application.
Only the reset vector needs protecting to avoid the vector bootloader to
be bricked. While overwriting the other vector might turn out not helpful,
it's the same as with many other interventions, so much so that the driver
should not prevent that. Hence, this commit withdraws the protection of
the jmp-to-application vector.
LIBAVRDUDE_EXIT was introduced to allow driver function to tell main.c
that all is done and avrdude should exit(0) indicating success. For
example, processing the -x help options in the driver should exit.
There have been increasingly more situations when the driver function
needed to return and suppress error messages from the caller; for these
LIBAVRDUDE_EXIT was used but now avrdude wrongly indicated success to the
shell when it should indicate an error.
This commit replaces LIBAVRDUDE_EXIT with LIBAVRDUDE_EXIT_FAIL or
LIBAVRDUDE_EXIT_OK as appropriate indicating error or success to the
shell, respectively.
pgm->type is an internal string that is unknown to users; in fact, even
developers don't necessarily know it well. This commit replaces references
to pgm->type to the more specific -c programmer (that the user provided).
Remove SVN $Id$ tags from source files which have been made
obsolete by moving to git and serve no purpose any more.
This mostly removes the matches printed by the command
git grep -E '\$[A-Za-z]+\$'
The remaining exceptions are some binary files (PDF and font files),
and jquery js files with both $Id$ and $Date$ tags.
As it can happen that there is a leftover `src/ac_cfg.h` when
running an out of tree cmake build (you might have run `cmake .`
or `./src/bootstrap`), the out of tree cmake build must look
for `ac_cfg.h` in its builddir first (e.g. `build_linux/src/`).
Otherwise the cmake build picks up and uses whatever data happens
to be in `src/ac_cfg.h`.
Both the MSVC and GCC C processors are documented to look in the
location of the `#include` directive for the included file first
for double quoted includes, so the old `#include "ac_cfg.h"` was
exactly the wrong thing to do. clang probably does the same, and
ISO C specifies the sequence of places to look for include files
as implementation defined.
So this changes all occurrences of `#include "ac_cfg.h"` to
`#include <ac_cfg.h>` which follows the sequence of `-I` or `/I`
directives as cmake builds add via `include_directories` or
`target_include_directories`.
Fixes: https://github.com/avrdudes/avrdude/issues/1706