diff --git a/firmware/bootloader/bootloader.cpp b/firmware/bootloader/bootloader.cpp index b27ecb1..1b78704 100644 --- a/firmware/bootloader/bootloader.cpp +++ b/firmware/bootloader/bootloader.cpp @@ -21,11 +21,11 @@ void boot_app() { // Reset peripherals we might have used rccDisableCAN1(); - volatile uint32_t* appFlash = &__appflash_start__; + const uint32_t* appFlash = &__appflash_start__; // copy vector table to sram // TODO: use __ram_vectors_size__ - memcpy(reinterpret_cast(&__ram_vectors_start__), reinterpret_cast(&__appflash_start__), 256); + memcpy(reinterpret_cast(&__ram_vectors_start__), appFlash, 256); // The reset vector is at offset 4 (second uint32) uint32_t reset_vector = appFlash[1];