boards: st: stm32l562e_dk: correct ns variant RAM info
TF-M owns the last 64kByte of SoC internal SRAM1 in 'ns' variant of
board stm32l562e_dk. Update the board variant DTS and YAML files
accordingly and remove the default allocation of 2kB of malloc pool
that worked around this missing information.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
diff --git a/boards/st/stm32l562e_dk/Kconfig.defconfig b/boards/st/stm32l562e_dk/Kconfig.defconfig
index 154a875..55ce257 100644
--- a/boards/st/stm32l562e_dk/Kconfig.defconfig
+++ b/boards/st/stm32l562e_dk/Kconfig.defconfig
@@ -30,18 +30,6 @@
endif # DISPLAY
-if BUILD_WITH_TFM
-
-# Not defining LIBC malloc arena has the effect of declaring all available RAM
-# as available for malloc.
-# This currently conflicts with TF-M MPU setting, resulting in a hard fault.
-# Define a specific size to avoid this situation.
-
-config COMMON_LIBC_MALLOC_ARENA_SIZE
- default 2048
-
-endif # BUILD_WITH_TFM
-
config INPUT
default y if LVGL
diff --git a/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.dts b/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.dts
index 8c0ce36..2203d24 100644
--- a/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.dts
+++ b/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.dts
@@ -28,6 +28,11 @@
};
};
+/* Last 64kB of SRAM1 (node label sram0) are owned by TF-M */
+&sram0 {
+ reg = <0x20000000 DT_SIZE_K(192 - 64)>;
+};
+
&rtc {
clocks = <&rcc STM32_CLOCK(APB1, 10)>,
<&rcc STM32_SRC_LSE RTC_SEL(1)>;
diff --git a/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.yaml b/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.yaml
index 8c6df5a..b7daaf25 100644
--- a/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.yaml
+++ b/boards/st/stm32l562e_dk/stm32l562e_dk_stm32l562xx_ns.yaml
@@ -14,6 +14,6 @@
- spi
- arduino_spi
- usb_device
-ram: 192
+ram: 128
flash: 168
vendor: st