diff --git a/firmware/bootloader/Makefile b/firmware/bootloader/Makefile index 57115c4..3379ce3 100644 --- a/firmware/bootloader/Makefile +++ b/firmware/bootloader/Makefile @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -Og -ggdb -fomit-frame-pointer -falign-functions=16 -fsingle-precision-constant + USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16 -fsingle-precision-constant endif # C specific options here (added to USE_OPT). diff --git a/firmware/bootloader/bootloader.cpp b/firmware/bootloader/bootloader.cpp index 1b78704..4f87655 100644 --- a/firmware/bootloader/bootloader.cpp +++ b/firmware/bootloader/bootloader.cpp @@ -8,11 +8,6 @@ extern uint32_t __appflash_start__; extern uint32_t __ram_vectors_start__; extern int __ram_vectors_size__; -__attribute__((noreturn)) -void jump_to(uint32_t address) { - __asm__ __volatile__ ("bx r0"); -} - __attribute__((noreturn)) void boot_app() { // Goodbye, ChibiOS @@ -37,7 +32,8 @@ void boot_app() { //uint32_t app_msp = appLocation[0]; //__set_MSP(app_msp); - jump_to(reset_vector); + typedef void (*ResetVectorFunction)(void); + ((ResetVectorFunction)reset_vector)(); } /*