Skip to content

Commit

Permalink
Fix RAM size output of stm32_get_memory_info
Browse files Browse the repository at this point in the history
  • Loading branch information
ciuzhienki committed Jun 10, 2024
1 parent 369b66d commit b1f62c9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmake/stm32/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1f62c9

Please sign in to comment.