From 228f98a7bea12a3cc18aab18f50951d3256bc5fe Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 24 Feb 2020 15:16:43 +0100 Subject: [PATCH] test-blink: Switch back to DFU boot-loader --- mk/bluepill.mk | 4 +++- test-blink/Makefile | 6 +++--- test-blink/test.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mk/bluepill.mk b/mk/bluepill.mk index e762525..cf034b3 100644 --- a/mk/bluepill.mk +++ b/mk/bluepill.mk @@ -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 diff --git a/test-blink/Makefile b/test-blink/Makefile index 953160a..bc56e38 100644 --- a/test-blink/Makefile +++ b/test-blink/Makefile @@ -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 diff --git a/test-blink/test.c b/test-blink/test.c index e56426c..714ea82 100644 --- a/test-blink/test.c +++ b/test-blink/test.c @@ -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 (;;) { -- 2.39.5