Skip to content

Commit

Permalink
Merge pull request ObKo#345 from ciuzhienki/master
Browse files Browse the repository at this point in the history
stm32_get_memory_info : FAMILY field is no longer required to get the ram size
  • Loading branch information
Hish15 authored Jul 12, 2024
2 parents d8f9e07 + b1f62c9 commit 5f5c92c
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 5f5c92c

Please sign in to comment.