Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de>
$(RM) usbdrv/usbdrv.s
# file targets:
-main.bin: $(OBJECTS)
+main.bin: $(OBJECTS) bootloaderconfig.h
$(CC) $(CFLAGS) -o main.bin $(OBJECTS) $(LDFLAGS)
main.hex: 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
updater.hex: updater.elf
$(OBC) -j .text -j .data -O ihex updater.elf updater.hex
$(ECHO) "."
+ $(ECHO) "."
$(SIZ) updater.elf
$(ECHO) "."
$(AVRDUDE) -D -U flash:w:updater.hex:i
$(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
#include <util/delay.h>
#include <string.h>
-
+#include "../firmware/bootloaderconfig.h"
+#if !HAVE_SPMINTEREFACE
+ #error "bootloader does not support updating itself! (HAVE_SPMINTEREFACE)"
+#endif
// helpful definitions and makros ////