From eaa52e99c4393952f27f651f0cd77f7a284e4175 Mon Sep 17 00:00:00 2001 From: ALTracer <11005378+ALTracer@users.noreply.github.com> Date: Fri, 16 Aug 2024 20:39:40 +0300 Subject: [PATCH] stm32h5: Add SRAM alias for H503 at 0x20000000 --- src/target/stm32h5.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/target/stm32h5.c b/src/target/stm32h5.c index b49d8c811cc..9340853ba01 100644 --- a/src/target/stm32h5.c +++ b/src/target/stm32h5.c @@ -68,6 +68,8 @@ #define STM32H503_SRAM1_SIZE 0x00004000U #define STM32H503_SRAM2_BASE 0x0a004000U #define STM32H503_SRAM2_SIZE 0x00004000U +#define STM32H503_SRAM1_ALIAS 0x20000000U +#define STM32H503_SRAM2_ALIAS 0x20004000U #define STM32H5_FLASH_BASE 0x40022000 #define STM32H5_FLASH_ACCESS_CTRL (STM32H5_FLASH_BASE + 0x000U) @@ -240,6 +242,8 @@ bool stm32h5_probe(target_s *const target) */ target_add_ram32(target, STM32H503_SRAM1_BASE, STM32H503_SRAM1_SIZE); target_add_ram32(target, STM32H503_SRAM2_BASE, STM32H503_SRAM2_SIZE); + target_add_ram32(target, STM32H503_SRAM1_ALIAS, STM32H503_SRAM1_SIZE); + target_add_ram32(target, STM32H503_SRAM2_ALIAS, STM32H503_SRAM2_SIZE); /* Build the Flash map */ stm32h5_add_flash(target, STM32H503_FLASH_BANK1_BASE, STM32H503_FLASH_BANK_SIZE,