fix: typos within Readme.txt - further extend the list of files
[pub/USBaspLoader.git] / updater / Makefile
index a3aa145..7764cad 100644 (file)
@@ -36,15 +36,22 @@ endif
 
 all:  updater.hex
 
+flash: all
+       $(ECHO) "."
+       $(AVRDUDE) -D -U flash:w:updater.hex:i
+       $(ECHO) "."
+       $(ECHO) "."
+
+
 ../firmware/main.bin:
        $(MAKE) -C ../firmware main.hex
 
 
-usbasploader.raw:
+usbasploader.raw: ../firmware/main.bin
        $(OBC) -j .text -j .data -O binary ../firmware/main.bin usbasploader.raw
 
 usbasploader.o: usbasploader.raw
-       $(OBC) -I binary -O elf32-avr --rename-section .data=.text --redefine-sym _binary_usbasploader_raw_start=usbasploader  usbasploader.raw usbasploader.o
+       $(OBC) -B $(MCUARCH) -I binary -O elf32-avr --rename-section .data=.text --redefine-sym _binary_usbasploader_raw_start=usbasploader  usbasploader.raw usbasploader.o
 
 
 updater.o: updater.c usbasploader.h usbasploader.raw usbasploader.o
@@ -57,18 +64,17 @@ updater.elf: updater.o usbasploader.o
 updater.hex: updater.elf
        $(OBC) -j .text -j .data -O ihex updater.elf updater.hex
        $(ECHO) "."
-       $(SIZ) updater.elf
        $(ECHO) "."
-       $(AVRDUDE) -D -U flash:w:updater.hex:i
+       $(SIZ) updater.elf
        $(ECHO) "."
 
-
 deepclean: clean
        $(RM) *~
 
 clean:
-       $(RM) *.o
-       $(RM) *.raw
+       $(RM) usbasploader.o
+       $(RM) updater.o
+       $(RM) usbasploader.raw
        $(RM) updater.hex
        $(RM) updater.elf
        $(RM) usbasploader.raw
\ No newline at end of file