make/tools/edbg: verify before flash
This commit overrides the default flash recipe with an edbg specific one. The new recipe first verifies the flashfile agains the device flash. If it is already on there, it won't get overridden. edbg takes care of resetting the device in any case.
This commit is contained in:
parent
1cba611dd9
commit
a45d99f741
@ -15,10 +15,17 @@ endif
|
||||
EDBG_ARGS += $(if $(IMAGE_OFFSET),--offset $(IMAGE_OFFSET))
|
||||
|
||||
FFLAGS ?= $(EDBG_ARGS) --target $(EDBG_DEVICE_TYPE) --verbose \
|
||||
--verify --program --file $(FLASHFILE)
|
||||
--file $(FLASHFILE)
|
||||
|
||||
ifeq ($(RIOT_EDBG),$(FLASHER))
|
||||
FLASHDEPS += $(RIOT_EDBG)
|
||||
endif
|
||||
RESET ?= $(EDBG)
|
||||
RESET_FLAGS ?= $(EDBG_ARGS) --target $(EDBG_DEVICE_TYPE)
|
||||
|
||||
define edbg-flash-recipe
|
||||
$(call check_cmd,$(FLASHER),Flash program)
|
||||
$(FLASHER) $(FFLAGS) --verify || $(FLASHER) $(FFLAGS) --verify --program
|
||||
endef
|
||||
|
||||
flash-recipe = $(edbg-flash-recipe)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user