From b9a284173027a41b3fd7e9a3b0b31647c7713a7c Mon Sep 17 00:00:00 2001 From: Matthew McGowan Date: Tue, 28 Oct 2014 00:56:05 +0100 Subject: [PATCH] merged PR #323 (dfu-suffix) into feature/hal --- build/common-tools.mk | 1 + build/module.mk | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build/common-tools.mk b/build/common-tools.mk index d4dc7622ae..9d689d51c3 100644 --- a/build/common-tools.mk +++ b/build/common-tools.mk @@ -15,6 +15,7 @@ OBJCOPY = $(GCC_ARM_PATH)$(GCC_PREFIX)objcopy OBJDUMP = $(GCC_ARM_PATH)$(GCC_PREFIX)objdump SIZE = $(GCC_ARM_PATH)$(GCC_PREFIX)size DFU = dfu-util +DFUSUFFIX = dfu-suffix CURL = curl CPPFLAGS += -std=gnu++11 diff --git a/build/module.mk b/build/module.mk index 9c1a4cf22f..8fcab36054 100644 --- a/build/module.mk +++ b/build/module.mk @@ -85,7 +85,7 @@ none: # Program the core using dfu-util. The core should have been placed # in bootloader mode before invoking 'make program-dfu' -program-dfu: $(TARGET_BASE).bin +program-dfu: $(TARGET_BASE).dfu @echo Flashing using dfu: $(DFU) -d 1d50:607f -a 0 -s 0x08005000:leave -D $< @@ -114,6 +114,12 @@ size: $(TARGET_BASE).elf $(VERBOSE)$(OBJCOPY) -O ihex $< $@ $(call,echo,) + +# Create a DFU file from bin file +%.dfu: %.bin + @cp $< $@ + $(DFUSUFFIX) -v 1d50 -p 607f -a $@ + # Create a bin file from ELF file %.bin : %.elf $(call,echo,'Invoking: ARM GNU Create Flash Image')