From 12287ff0a55f929bf840dcb4780d3f77b862c434 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 2 Nov 2014 18:17:44 +0000 Subject: fish --- Makefile.rules | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Makefile.rules') 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" \ -- cgit v1.2.3