mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Alexandre Abadie
c7f6d53773
This module implements the 2 functions called when requesting a board 'reset in application' and 'board reset in bootloader' actions. This module will also configure the behaviour of bossa flasher and has a dependency on USBUS CDC ACM module for providing STDIO over USB
32 lines
993 B
Makefile
32 lines
993 B
Makefile
# setup the flash tool used
|
|
# Bossa is the default programmer
|
|
PROGRAMMER ?= bossa
|
|
|
|
ifeq ($(PROGRAMMER),bossa)
|
|
# by default, we use BOSSA to flash this board and take into account the
|
|
# preinstalled Arduino bootloader. ROM_OFFSET skips the space taken by
|
|
# such bootloader.
|
|
ROM_OFFSET ?= 0x2000
|
|
BOSSA_ARDUINO_PREFLASH = yes
|
|
PREFLASH_DELAY = 1
|
|
|
|
ifneq (,$(filter reset flash flash-only, $(MAKECMDGOALS)))
|
|
# By default, add 2 seconds delay before opening terminal: this is required
|
|
# when opening the terminal right after flashing. In this case, the stdio
|
|
# over USB needs some time after reset before being ready.
|
|
TERM_DELAY ?= 2
|
|
TERMDEPS += term-delay
|
|
endif
|
|
|
|
include $(RIOTMAKE)/tools/bossa.inc.mk
|
|
endif
|
|
|
|
term-delay:
|
|
sleep $(TERM_DELAY)
|
|
|
|
TESTRUNNER_CONNECT_DELAY ?= $(TERM_DELAY)
|
|
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
|
|
|
|
# Add the samd21-arduino-bootloader directory to the build
|
|
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader
|