diff --git a/conf/boards/lisa_m_2.0.makefile b/conf/boards/lisa_m_2.0.makefile index ca2755eb1c..5af995b5b4 100644 --- a/conf/boards/lisa_m_2.0.makefile +++ b/conf/boards/lisa_m_2.0.makefile @@ -25,6 +25,7 @@ FLASH_MODE = DFU endif ifndef NO_LUFTBOOT +$(TARGET).CFLAGS+=-DLUFTBOOT $(TARGET).LDFLAGS+=-Wl,-Ttext=0x8002000 endif diff --git a/sw/airborne/arch/stm32/mcu_arch.c b/sw/airborne/arch/stm32/mcu_arch.c index 9a3c84f27e..dfdfd500b0 100644 --- a/sw/airborne/arch/stm32/mcu_arch.c +++ b/sw/airborne/arch/stm32/mcu_arch.c @@ -30,8 +30,13 @@ #include #include #include +#include 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();