[stm32] Fixed BMP firmware upload reset when using luftboot.

This commit is contained in:
Piotr Esden-Tempski
2012-09-16 04:26:16 -07:00
parent 91aaaedc90
commit ae0285d400
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -25,6 +25,7 @@ FLASH_MODE = DFU
endif
ifndef NO_LUFTBOOT
$(TARGET).CFLAGS+=-DLUFTBOOT
$(TARGET).LDFLAGS+=-Wl,-Ttext=0x8002000
endif
+5
View File
@@ -30,8 +30,13 @@
#include <libopencm3/stm32/f1/gpio.h>
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/f1/flash.h>
#include <libopencm3/stm32/f1/scb.h>
void mcu_arch_init(void) {
#if LUFTBOOT
#pragma message "We are running luftboot, the interrupt vector is being relocated."
SCB_VTOR = 0x00002000;
#endif
#if EXT_CLK == 8000000
#pragma message "Using 8MHz external clock to PLL it to 72MHz."
rcc_clock_setup_in_hse_8mhz_out_72mhz();