From b1f62c97de13603ca4d793cdaff701814e970099 Mon Sep 17 00:00:00 2001 From: Ciu-Zhienki Date: Mon, 10 Jun 2024 16:18:16 +0800 Subject: [PATCH] Fix RAM size output of stm32_get_memory_info --- cmake/stm32/common.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/stm32/common.cmake b/cmake/stm32/common.cmake index 391c34ab..d5b60146 100644 --- a/cmake/stm32/common.cmake +++ b/cmake/stm32/common.cmake @@ -266,21 +266,21 @@ function(stm32_get_memory_info) set(RAM_SHARE_ORIGIN 0x20030000) unset(TWO_FLASH_BANKS) - if(FAMILY STREQUAL "F1") + if(INFO_FAMILY STREQUAL "F1") stm32f1_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} FLASH RAM) - elseif(FAMILY STREQUAL "L1") + elseif(INFO_FAMILY STREQUAL "L1") stm32l1_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} FLASH RAM) - elseif(FAMILY STREQUAL "F2") + elseif(INFO_FAMILY STREQUAL "F2") stm32f2_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} FLASH RAM) - elseif(FAMILY STREQUAL "F3") + elseif(INFO_FAMILY STREQUAL "F3") stm32f3_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} FLASH RAM) - elseif(FAMILY STREQUAL "H7") + elseif(INFO_FAMILY STREQUAL "H7") stm32h7_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} "${INFO_CORE}" RAM FLASH_ORIGIN RAM_ORIGIN TWO_FLASH_BANKS) - elseif(FAMILY STREQUAL "WL") + elseif(INFO_FAMILY STREQUAL "WL") stm32wl_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} "${INFO_CORE}" RAM FLASH_ORIGIN RAM_ORIGIN TWO_FLASH_BANKS) - elseif(FAMILY STREQUAL "WB") + elseif(INFO_FAMILY STREQUAL "WB") stm32wb_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} "${INFO_CORE}" RAM RAM_ORIGIN TWO_FLASH_BANKS) - elseif(FAMILY STREQUAL "MP1") + elseif(INFO_FAMILY STREQUAL "MP1") stm32mp1_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} FLASH) endif() # when a device is dual core, each core uses half of total flash