mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 18:13:49 +01:00
19616: boards/adafruit-clue: use shared usb_board_reset.mk for flash/reset/term targets r=aabadie a=aabadie
19617: make/usb_board_reset: define {preflash,term}-delay when necessary r=aabadie a=aabadie
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
This commit is contained in:
commit
57555ca849
@ -8,18 +8,5 @@ ifeq ($(PROGRAMMER),adafruit-nrfutil)
|
|||||||
# The preinstalled bootloader must also be taken into account so
|
# The preinstalled bootloader must also be taken into account so
|
||||||
# ROM_OFFSET skips the space taken by such bootloader.
|
# ROM_OFFSET skips the space taken by such bootloader.
|
||||||
ROM_OFFSET = 0x26000
|
ROM_OFFSET = 0x26000
|
||||||
|
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
||||||
ifneq (,$(filter reset flash flash-only, $(MAKECMDGOALS)))
|
|
||||||
# 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
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
term-delay:
|
|
||||||
sleep $(TERM_DELAY)
|
|
||||||
|
|
||||||
TESTRUNNER_CONNECT_DELAY ?= $(TERM_DELAY)
|
|
||||||
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
|
|
||||||
|
|||||||
@ -28,8 +28,12 @@ RESET ?= $(PREFLASHER) $(RESETFFLASG)
|
|||||||
TESTRUNNER_CONNECT_DELAY ?= $(TERM_DELAY)
|
TESTRUNNER_CONNECT_DELAY ?= $(TERM_DELAY)
|
||||||
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
|
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
|
||||||
|
|
||||||
|
ifneq (,$(filter flash flash-only,$(MAKECMDGOALS)))
|
||||||
preflash-delay: preflash
|
preflash-delay: preflash
|
||||||
sleep $(PREFLASH_DELAY)
|
sleep $(PREFLASH_DELAY)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter term,$(MAKECMDGOALS)))
|
||||||
term-delay: $(TERMDELAYDEPS)
|
term-delay: $(TERMDELAYDEPS)
|
||||||
sleep $(TERM_DELAY)
|
sleep $(TERM_DELAY)
|
||||||
|
endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user