From 9bf4f7e3d397e7e602fb83c80c35ab30f97e9f76 Mon Sep 17 00:00:00 2001 From: Sven Wegener Date: Sun, 18 May 2014 13:15:02 +0200 Subject: [PATCH] stmhal: Remap system flash and adjust addresses Signed-off-by: Sven Wegener --- stmhal/modpyb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stmhal/modpyb.c b/stmhal/modpyb.c index d93665e305..47e9710d75 100644 --- a/stmhal/modpyb.c +++ b/stmhal/modpyb.c @@ -70,8 +70,9 @@ STATIC NORETURN mp_obj_t pyb_bootloader(uint n_args, const mp_obj_t *args) { HAL_RCC_DeInit(); HAL_DeInit(); - __set_MSP(*((uint32_t*) 0x1fff0000)); - ((void (*)(void)) *((uint32_t*) 0x1fff0004))(); + __HAL_REMAPMEMORY_SYSTEMFLASH(); + __set_MSP(*((uint32_t*) 0x00000000)); + ((void (*)(void)) *((uint32_t*) 0x00000004))(); while (1); }