If `AVRDUDE_PROGRAMMER` is already set to a programmer that is also
capable of debugging, we can assume that typically the user will want
to use the same hardware for debugging. Thus, let `AVR_DEBUGDEVICE`
default to the matching hardware.
The current script don't allow change debug protocol and not allows
set proper part name for xmega. This make DEBUGPROTO optional with
JTAG as default protocol. It add a filter for atxmega to add proper
AVRDUDE_PROGRAMMER_FLAGS.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
- Add the new EXTERNAL_BOARD_DIRS variable that can contain a space separated
list of folders containing external boards
- Introduce $(BOARDDIR) as shortcut for $(BOARDSDIR)/$(BOARD)
- Map the existing BOARDSDIR to the new approach
- If BOARDSDIR is provided by the user, it will be added to
EXTERNAL_BOARD_DIRS for backward compatibility. (And a warning is issued
to encourage users migrating to EXTRA_BOARDS.)
- BOARDSDIR is updated after the board is found to "$(BOARDDIR)/..".
- Useful for `include $(BOARDSDIR)/common/external_common/Makefile.dep`
- Provides backward compatibility
The generic approach of calling avrdude to perform a reset with `make reset`
does also work on board with a bootloader, but only if no other process is
also accessing the serial (e.g. via `make term`). `make test` first accesses
the serial and then performs `make reset` to not miss any output on the serial.
This however blocks when `make reset` also wants to access that serial.
As workaround, `make reset` is no only provided if the ATmega device is not
programmed via bootloader. Normally, those boards reset anyway upon `make term`,
which allows `make test` to work normally again.
In order to flash AVR devices, avrdude needs the ability to reset them:
Those using a bootloader will only enter it after a reset, and those programmed
via ISP also need a reset to enter ISP mode.
Sadly, avrdude has no option to reset the board. But running it without commands
will read and print the boards identification and fuse settings. For this, as
reset is needed. This commit uses this side-effect reset to implement make reset
for all AVR based boards
- Move serial.inc.mk in mega-xplained/Makefile.include after
PROG_DEV so PROG_DEV can still default to PORT
- Add deprecation warning for arduino-leonardo and mega-xplained
The CPU variable in the boards Makefile.include file already contains the target
CPU, so there is no reason to provide it in each board again as avrdude flag.
This commit automatically sets the avrdude target from the CPU variable and
removes the unneeded flags.
Currently the flag "-P ${PORT}" is added to avrdude regardless of the programmer
used. But this flag should only be set for programmers that operate over a
serial port - e.g. like the various Arduino bootloaders. This commit changes
the behaviour so that the "-P flag" is only set for only of the default
programmers of the various AVR boards supported by RIOT. This allows to use
ICSP programmers (e.g. like the usbtiny) like this:
make BOARD=arduino-uno PROGRAMMER=usbtiny
Allows to use avrdude as a flashing tool in any context
(e.g. not dependent on arduino or atmega) though it only
works (AFAIK) on atmega, but I thought it's better to
have it here as we have other flashing tools.