Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DFU suffix to .bin file #323

Merged
merged 2 commits into from
Oct 21, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ applications/
*.elf
*.bin
*.map
*.hex
*.hex
*.dfu
7 changes: 6 additions & 1 deletion build/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ hex: $(TARGETDIR)$(TARGET).hex

# Program the core using dfu-util. The core should have been placed
# in bootloader mode before invoking 'make program-dfu'
program-dfu: $(TARGETDIR)$(TARGET).bin
program-dfu: $(TARGETDIR)$(TARGET).dfu
@echo Flashing using dfu:
$(DFU) -d 1d50:607f -a 0 -s 0x08005000:leave -D $<

Expand Down Expand Up @@ -200,6 +200,11 @@ size: $(TARGETDIR)$(TARGET).elf
$(OBJCOPY) -O binary $< $@
@echo

# Create a DFU file from bin file
%.dfu: %.bin
@cp $< $@
$(DFUSUFFIX) -v 1d50 -p 607f -a $@

$(TARGETDIR)$(TARGET).elf : check_external_deps $(ALLOBJ)
@echo Building target: $@
@echo Invoking: ARM GCC C++ Linker
Expand Down
1 change: 1 addition & 0 deletions build/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AR = $(GCC_PREFIX)ar
OBJCOPY = $(GCC_PREFIX)objcopy
SIZE = $(GCC_PREFIX)size
DFU = dfu-util
DFUSUFFIX = dfu-suffix
CURL = curl

RM = rm -f
Expand Down