From 13de591a951e59346e7c66a8093c0517ff501144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Tue, 23 Apr 2019 14:55:55 +0200 Subject: [PATCH] Makefile.include: allow overwriting flash-recipe This allows changing the flashing commands from the outside or in a BSP. --- Makefile.include | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index c8900ac7ce..a5d81fc04d 100644 --- a/Makefile.include +++ b/Makefile.include @@ -526,10 +526,12 @@ distclean: -@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i distclean ; done -@rm -rf $(BINDIRBASE) -define flash-recipe +# Define flash-recipe with a default value +define default-flash-recipe $(call check_cmd,$(FLASHER),Flash program) $(FLASHER) $(FFLAGS) endef +flash-recipe ?= $(default-flash-recipe) # Do not add dependencies to "flash" directly, use FLASHDEPS, as this is shared # with flash-only too