Skip to content

Commit

Permalink
merged PR #323 (dfu-suffix) into feature/hal
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mcgowan committed Oct 27, 2014
1 parent 6bf1ebb commit b9a2841
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions build/common-tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion build/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<

Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit b9a2841

Please sign in to comment.