summaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorroot <root@lab2.panaceas.james.local>2014-11-02 18:17:44 +0000
committerroot <root@lab2.panaceas.james.local>2014-11-02 18:17:44 +0000
commit12287ff0a55f929bf840dcb4780d3f77b862c434 (patch)
tree46632674f393249e7cd74eacd7a4da00ccec540f /Makefile.rules
parent479e719a64d75374f00438498cf91ba2601a63f1 (diff)
downloadstm32_usb_kvm-12287ff0a55f929bf840dcb4780d3f77b862c434.tar.gz
stm32_usb_kvm-12287ff0a55f929bf840dcb4780d3f77b862c434.tar.bz2
stm32_usb_kvm-12287ff0a55f929bf840dcb4780d3f77b862c434.zip
fish
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules18
1 files changed, 11 insertions, 7 deletions
diff --git a/Makefile.rules b/Makefile.rules
index b67e343..73bdf20 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -123,7 +123,7 @@ LDLIBS += -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group
###############################################################################
###############################################################################
-.SUFFIXES: .elf .bin .hex .srec .list .map .images
+.SUFFIXES: .elf .bin .hex .srec .list .map .images .dfu
.SECONDEXPANSION:
.SECONDARY:
@@ -138,7 +138,7 @@ list: $(BINARY).list
images: $(BINARY).images
flash: $(BINARY).flash
-%.images: %.bin %.hex %.srec %.list %.map
+%.images: %.bin %.hex %.srec %.list %.map %.dfu
@#printf "*** $* images generated ***\n"
%.bin: %.elf
@@ -149,6 +149,10 @@ flash: $(BINARY).flash
@#printf " OBJCOPY $(*).hex\n"
$(Q)$(OBJCOPY) -Oihex $(*).elf $(*).hex
+%.dfu: %.elf
+ @#printf " OBJCOPY $(*).dfu\n"
+ $(Q)$(OBJCOPY) -Obinary $(*).elf $(*).dfu
+
%.srec: %.elf
@#printf " OBJCOPY $(*).srec\n"
$(Q)$(OBJCOPY) -Osrec $(*).elf $(*).srec
@@ -179,7 +183,7 @@ fish:
clean:
@#printf " CLEAN\n"
- $(Q)$(RM) *.o *.d *.elf *.bin *.hex *.srec *.list *.map *~
+ $(Q)$(RM) *.o *.d *.elf *.bin *.hex *.srec *.list *.map *~ *.dfu
stylecheck: $(STYLECHECKFILES:=.stylecheck)
styleclean: $(STYLECHECKFILES:=.styleclean)
@@ -207,8 +211,8 @@ ifeq ($(OOCD_SERIAL),)
%.flash: %.hex
@printf " FLASH $<\n"
@# IMPORTANT: Don't use "resume", only "reset" will work correctly!
- $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
- -f board/$(OOCD_BOARD).cfg \
+ $(Q)$(OOCD) -f $(OOCD_INTERFACE) \
+ -f $(OOCD_BOARD) \
-c "init" -c "reset init" \
-c "flash write_image erase $(*).hex" \
-c "reset" \
@@ -217,8 +221,8 @@ else
%.flash: %.hex
@printf " FLASH $<\n"
@# IMPORTANT: Don't use "resume", only "reset" will work correctly!
- $(Q)$(OOCD) -f interface/$(OOCD_INTERFACE).cfg \
- -f board/$(OOCD_BOARD).cfg \
+ $(Q)$(OOCD) -f $(OOCD_INTERFACE) \
+ -f $(OOCD_BOARD) \
-c "ft2232_serial $(OOCD_SERIAL)" \
-c "init" -c "reset init" \
-c "flash write_image erase $(*).hex" \