1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

18 Commits

Author SHA1 Message Date
Marian Buschsieweke
7df2bc2072
tools/avarice: deduce debugger from AVRDUDE_PROGRAMMER
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.
2022-09-23 13:41:27 +02:00
Benjamin Valentin
1111631c45 makefiles/tools: define DEBUG_ELFFILE and use it for debugging 2022-05-31 12:39:16 +02:00
Gerson Fernando Budke
1d55c85f24 makefiles/tools/avrdude: Add xmega cpu conditions
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>
2021-03-15 20:16:10 -03:00
2bcc754fe5
makefiles/tools: ensure all FLASHER/DEBUGGER* vars are overridable 2020-11-27 13:39:22 +01:00
c6ad85a7b0
boards: don't include programmer logic at board level 2020-11-25 22:31:13 +01:00
Marian Buschsieweke
ba7815163c
Makefile*: Allow multiple external board dirs
- 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
2020-04-29 18:32:39 +02:00
Marian Buschsieweke
f2edcf9674
makefiles/tools/avrdude: Improved debug handling
- Choose correct debug protocol for ATmega328P (which supports debugWIRE instead
  of JTAG)
- Allow overwriting debugger device via AVR_DEBUGDEVICE environment variable,
  default to the Atmel-ICE (least expensive, supports most AVR devices)
2020-03-10 14:03:33 +01:00
Marian Buschsieweke
edd93411fe
dist: De-duplicated AVR debug config & scripts
Use common debug.sh, debug_srv.sh and gdb.conf for all AVR boards.
2020-03-10 12:54:51 +01:00
Gaëtan Harter
41a891f284
tools: use 'BOARDSDIR' for the boards directory
Replace uses of 'RIOTBOARD' by 'BOARDSDIR' for tools.
2019-12-16 15:35:04 +01:00
Marian Buschsieweke
f44dd00276
tools/avrdude: Fix make reset with bootloader
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.
2019-11-25 14:39:25 +01:00
Marian Buschsieweke
135a37a4d1
makefiles/tools: Allow make reset via avrdude
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
2019-11-17 14:46:48 +01:00
1a16ee8215
makefiles/avrdude: allow setting debug server interface 2019-11-05 10:40:32 +01:00
Francisco Molina
bf25e12602 makefiles/tools/avrdude.inc.mk: migrate to use PROG_DEV
- 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
2019-10-24 12:57:07 +02:00
Thomas Perrot
b63121c588
board: add support for arduino-leonardo 2019-05-24 15:12:47 +02:00
Gaëtan Harter
9bf7d5bb1a
tools/avrdude.inc.mk: use FLASHFILE variable
Update to use FLASHFILE as file to be flashed on the board.
2019-03-14 18:16:43 +01:00
Marian Buschsieweke
4abc41a227
makefiles/tools: Automatically set avrdude target
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.
2019-02-28 20:55:04 +01:00
Marian Buschsieweke
93cd8a1b04
makefiles/tools: fix avrdude with ICSP programmers
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
2019-02-28 20:55:00 +01:00
Francisco Acosta
6bbf372d7d makefiles: factor out avrdude configuration
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.
2019-02-05 17:12:02 +01:00