From 59ef4652c0df83e71b88540329a7ab91ffd0f5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Wed, 12 Jun 2019 15:11:10 +0200 Subject: [PATCH] bootloader: fix compiler warning --- bootloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootloader.c b/bootloader.c index 3355353..932e41c 100644 --- a/bootloader.c +++ b/bootloader.c @@ -15,7 +15,7 @@ /** USB DFU bootloader * @file bootloader.c * @author King Kévin - * @date 2017 + * @date 2017-2019 */ /* standard libraries */ #include // standard integer types @@ -81,7 +81,7 @@ void main(void) if (!dfu_force && (((*application) & 0xFFFE0000) == 0x20000000)) { // application at address seems valid SCB_VTOR = (volatile uint32_t)(application); // set vector table to application vector table (store at the beginning of the application) __asm__ volatile ("MSR msp,%0" : :"r"(*application)); // set stack pointer to address provided in the beginning of the application (loaded into a register first) - (*(void(**)(void))(application + 1))(); // start application (by jumping to the reset function which address is stored as second entry of the vector table) + (*(void(**)(void))((uint32_t)application + 4))(); // start application (by jumping to the reset function which address is stored as second entry of the vector table) } rcc_clock_setup_in_hse_8mhz_out_72mhz(); // start main clock