From 7b99a5152fc5f3da77d8e7f885c6d7b96c157ff7 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Tue, 15 Nov 2022 22:29:34 +0100 Subject: [PATCH] cpu/stm32: fix RAM_LEN for F427, F429, F437, F439 models These models have 256 kByte RAM, but the upper 64 kByte are used as CCM data RAM accessible at 0x1000:0000. The access to 0x2003:xxxx leads to a hard fault. --- cpu/stm32/stm32_mem_lengths.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu/stm32/stm32_mem_lengths.mk b/cpu/stm32/stm32_mem_lengths.mk index d26166a55b3c..2e6471d793a0 100644 --- a/cpu/stm32/stm32_mem_lengths.mk +++ b/cpu/stm32/stm32_mem_lengths.mk @@ -159,12 +159,14 @@ ifeq ($(STM32_TYPE), F) RAM_LEN = 32K else ifneq (, $(filter $(STM32_MODEL), 411 446)) RAM_LEN = 128K - else ifneq (, $(filter $(STM32_MODEL), 412 427 429 437 439)) + else ifneq (, $(filter $(STM32_MODEL), 412)) RAM_LEN = 256K else ifneq (, $(filter $(STM32_MODEL), 413 423)) RAM_LEN = 320K else ifneq (, $(filter $(STM32_MODEL), 415 417)) RAM_LEN = 192K + else ifneq (, $(filter $(STM32_MODEL), 427 429 437 439)) + RAM_LEN = 192K else ifneq (, $(filter $(STM32_MODEL), 469 479)) RAM_LEN = 384K endif