From f60d53eba256e1d946f250b5cf7d4bc70417278e Mon Sep 17 00:00:00 2001 From: Oliver Joos Date: Sun, 21 Nov 2021 12:57:39 +0100 Subject: [PATCH] allow for a custom application start vector on stm32 To set a custom application start vector define in your "board.h": #define BOARD_FLASH_APP_START 0x08020000 The default start vectors are still 0x08004000 on stm32f3 and 0x08010000 on stm32f4. Other common start vectors on stm32f4 are 0x08008000 and 0x08020000. --- ports/stm32f3/boards.h | 2 ++ ports/stm32f4/boards.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ports/stm32f3/boards.h b/ports/stm32f3/boards.h index 25880e1..34253fb 100644 --- a/ports/stm32f3/boards.h +++ b/ports/stm32f3/boards.h @@ -35,7 +35,9 @@ #include "board.h" // Flash Start Address of Application +#ifndef BOARD_FLASH_APP_START #define BOARD_FLASH_APP_START 0x08004000 +#endif #define BOARD_RAM_START 0x20000000 #define BOARD_RAM_SIZE 0x9FFF diff --git a/ports/stm32f4/boards.h b/ports/stm32f4/boards.h index 59b5f46..fd53b75 100644 --- a/ports/stm32f4/boards.h +++ b/ports/stm32f4/boards.h @@ -35,7 +35,9 @@ #include "board.h" // Flash Start Address of Application +#ifndef BOARD_FLASH_APP_START #define BOARD_FLASH_APP_START 0x08010000 +#endif // Double Reset tap to enter DFU #define TINYUF2_DFU_DOUBLE_TAP 1