]> mj.ucw.cz Git - home-hw.git/commitdiff
test-blink: Switch back to DFU boot-loader
authorMartin Mares <mj@ucw.cz>
Mon, 24 Feb 2020 14:16:43 +0000 (15:16 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 24 Feb 2020 14:16:43 +0000 (15:16 +0100)
mk/bluepill.mk
test-blink/Makefile
test-blink/test.c

index e762525e6dbfbd79e562154677c595695292906d..cf034b3c390244d015867c5b22efa222e43c2e84 100644 (file)
@@ -101,7 +101,9 @@ ifdef WITH_DFU_FLASH
 
 %.flash: %.bin
        @printf "  FLASH  $<\n"
-       $(Q)dfu-util -a2 -D $(*).bin
+       $(Q)dfu-util -D $(*).bin
+# For the STM32duino-bootloader, we used:
+#      $(Q)dfu-util -a2 -D $(*).bin
 
 else
 
index 953160afa40c7fe8f44dccaedf41e84f14fefdfb..bc56e385eda48606f75f8ec358c2842dba632a15 100644 (file)
@@ -3,8 +3,8 @@ BINARY=test
 OBJS=test.o
 LIB_OBJS=util-debug.o
 
-WITH_BOOT_LOADER=1
-WITH_DFU_FLASH=1
-WITH_SERIAL_FLASH=1
+WITH_BOOT_LOADER=1
+WITH_DFU_FLASH=1
+WITH_SERIAL_FLASH=1
 
 include $(ROOT)/mk/bluepill.mk
index e56426c3a324d1c6edafa1e1a40c289b198cbdc2..714ea828c8fe3f1092aecb737717eb2b02967b58 100644 (file)
@@ -49,8 +49,8 @@ int main(void)
        clock_setup();
        gpio_setup();
        tick_setup();
-       // This is needed when programming via serial boot loader, harmless otherwise.
-       SCB_VTOR = 0x08000000;
+       // When using the serial boot loader, we need this:
+       // SCB_VTOR = 0x08000000;
        cm_enable_interrupts();
 
        for (;;) {