From: Stephan Baerwolf Date: Sat, 10 Nov 2012 10:15:21 +0000 (+0100) Subject: have updater check HAVE_SPMINTEREFACE and raise error if not supported X-Git-Tag: v0.85~2 X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/commitdiff_plain/a93ee833f02abfd9cbd22cc14be1cbe630f9103e have updater check HAVE_SPMINTEREFACE and raise error if not supported Signed-off-by: Stephan Baerwolf --- diff --git a/firmware/Makefile b/firmware/Makefile index 6808086..094fc2f 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -70,7 +70,7 @@ clean: $(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 diff --git a/updater/Makefile b/updater/Makefile index a3aa145..475d664 100644 --- a/updater/Makefile +++ b/updater/Makefile @@ -40,7 +40,7 @@ all: updater.hex $(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 @@ -57,6 +57,7 @@ updater.elf: updater.o usbasploader.o 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 @@ -67,8 +68,9 @@ 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 diff --git a/updater/updater.c b/updater/updater.c index c1ff17d..559ce66 100644 --- a/updater/updater.c +++ b/updater/updater.c @@ -20,7 +20,10 @@ #include #include - +#include "../firmware/bootloaderconfig.h" +#if !HAVE_SPMINTEREFACE + #error "bootloader does not support updating itself! (HAVE_SPMINTEREFACE)" +#endif // helpful definitions and makros ////