Skip to content

Commit

Permalink
Merge pull request #278 from XANTH-IO/feature/add-wba-family
Browse files Browse the repository at this point in the history
Create WBA family
  • Loading branch information
xanthio authored Jul 20, 2024
2 parents bfeff28 + 115aef2 commit 2028c26
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/stm32/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ function(stm32_get_memory_info)
stm32wl_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} "${INFO_CORE}" RAM FLASH_ORIGIN RAM_ORIGIN TWO_FLASH_BANKS)
elseif(FAMILY STREQUAL "WB")
stm32wb_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} "${INFO_CORE}" FLASH RAM RAM_ORIGIN TWO_FLASH_BANKS)
elseif(FAMILY STREQUAL "WBA")
stm32wba_get_memory_info(${INFO_DEVICE} RAM)
elseif(FAMILY STREQUAL "MP1")
stm32mp1_get_memory_info(${INFO_DEVICE} ${INFO_TYPE} FLASH)
endif()
Expand Down
1 change: 1 addition & 0 deletions cmake/stm32/devices.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ include(stm32/u0)
include(stm32/u5)
include(stm32/wb)
include(stm32/wb0)
include(stm32/wba)
include(stm32/wl)
include(stm32/mp1)

Expand Down
61 changes: 61 additions & 0 deletions cmake/stm32/wba.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
set(STM32_WBA_TYPES
WBA54xx WBA55xx
)

set(STM32_WBA_TYPE_MATCH
"WBA54.[EG]" "WBA55.[EG]"
)

set(STM32_WBA_RAM_SIZES
0K 0K
)
set(STM32_WBA_CCRAM_SIZES
0K 0K
)

stm32_util_create_family_targets(WBA)

target_compile_options(STM32::WBA INTERFACE
-mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard
)
target_link_options(STM32::WBA INTERFACE
-mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard
)

function(stm32wba_get_memory_info DEVICE RAM_SIZE)
stm32_extract_info(${DEVICE} FLASH_CODE F)

if(F STREQUAL "E")
set(RAM "96K")
elseif(F STREQUAL "G")
set(RAM "128K")
else()
message(FATAL_ERROR "Unable to get RAM size for ${DEVICE}.")
endif()

set(${RAM_SIZE} ${RAM} PARENT_SCOPE)
endfunction()

set(STM32_WBA_DEVICES
WBA54CE
WBA54CG
WBA54KE
WBA54KG
WBA55CE
WBA55CG
WBA55UE
WBA55UG
)
list(APPEND STM32_ALL_DEVICES STM32_WBA_DEVICES)

list(APPEND STM32_SUPPORTED_FAMILIES_LONG_NAME
STM32WBA
)

list(APPEND STM32_FETCH_FAMILIES WBA)

# SERIE SS2261

set(CUBE_WBA_VERSION v1.3.1)
set(CMSIS_WBA_VERSION v1.3.0)
set(HAL_WBA_VERSION v1.3.0)

0 comments on commit 2028c26

Please sign in to comment.