From 923375380b29aca68b50b3ec685c6d83465fd63d Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Wed, 30 Mar 2022 10:50:18 +1100 Subject: [PATCH] stm32/boards: Increase mboot region to 32k for WB55 boards. If mboot is built with support for packing (signing/encryption) it needs up to 32KiB. So for simplicity increase the mboot region to 32KiB unconditionally for WB55 boards (custom WB55 board configurations can still provide their own linker scripts to override this). --- ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk | 2 +- ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.mk | 2 +- ports/stm32/boards/stm32wb55xg.ld | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk index 349ce46d79..2e6ce1fe8f 100644 --- a/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk @@ -6,7 +6,7 @@ STARTUP_FILE = $(STM32LIB_CMSIS_BASE)/Source/Templates/gcc/startup_stm32wb55xx_c ifeq ($(USE_MBOOT),1) # When using Mboot all the text goes together after the bootloader LD_FILES = boards/stm32wb55xg.ld boards/common_bl.ld -TEXT0_ADDR = 0x08004000 +TEXT0_ADDR = 0x08008000 else # When not using Mboot the text goes at the start of flash LD_FILES = boards/stm32wb55xg.ld boards/common_basic.ld diff --git a/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.mk b/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.mk index 349ce46d79..2e6ce1fe8f 100644 --- a/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.mk +++ b/ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.mk @@ -6,7 +6,7 @@ STARTUP_FILE = $(STM32LIB_CMSIS_BASE)/Source/Templates/gcc/startup_stm32wb55xx_c ifeq ($(USE_MBOOT),1) # When using Mboot all the text goes together after the bootloader LD_FILES = boards/stm32wb55xg.ld boards/common_bl.ld -TEXT0_ADDR = 0x08004000 +TEXT0_ADDR = 0x08008000 else # When not using Mboot the text goes at the start of flash LD_FILES = boards/stm32wb55xg.ld boards/common_basic.ld diff --git a/ports/stm32/boards/stm32wb55xg.ld b/ports/stm32/boards/stm32wb55xg.ld index 841c32b8a0..9b1e5bca14 100644 --- a/ports/stm32/boards/stm32wb55xg.ld +++ b/ports/stm32/boards/stm32wb55xg.ld @@ -6,7 +6,7 @@ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* sectors 0-127 */ - FLASH_APP (rx) : ORIGIN = 0x08004000, LENGTH = 496K /* sectors 4-127 */ + FLASH_APP (rx) : ORIGIN = 0x08008000, LENGTH = 480K /* sectors 8-127 */ FLASH_FS (r) : ORIGIN = 0x08080000, LENGTH = 256K /* sectors 128-191 */ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K /* SRAM1 */ RAM2A (xrw) : ORIGIN = 0x20030000, LENGTH = 10K /* SRAM2A */