From 8a783554824a1472e5d840e61012f1d04a083ea6 Mon Sep 17 00:00:00 2001 From: cladmi Date: Tue, 18 Sep 2018 18:28:19 +0200 Subject: [PATCH] edbg.inc.mk: handle IMAGE_OFFSET being defined with a space Handle that `IMAGE_OFFSET` can be set to something that contain spaces. With 'IMAGE_OFFSET=$$((0x1000 + 0x1000))' we had in the command line when doing 'flash' --offset $((0x1000 --offset + --offset 0x1000)) With the change we correctly have --offset $((0x1000 + 0x1000)) --- makefiles/tools/edbg.inc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/tools/edbg.inc.mk b/makefiles/tools/edbg.inc.mk index 12d945a153..a66bc30f53 100644 --- a/makefiles/tools/edbg.inc.mk +++ b/makefiles/tools/edbg.inc.mk @@ -12,7 +12,7 @@ ifneq (,$(DEBUG_ADAPTER_ID)) endif # Set offset according to IMAGE_OFFSET if it's defined -EDBG_ARGS += $(addprefix --offset ,$(IMAGE_OFFSET)) +EDBG_ARGS += $(if $(IMAGE_OFFSET),--offset $(IMAGE_OFFSET)) FFLAGS ?= $(EDBG_ARGS) -t $(EDBG_DEVICE_TYPE) -b -v -p -f $(HEXFILE)