Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of H5 family #320

Merged
merged 16 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
family: [C0, F0, F1, F2, F3, F4, F7, G0, G4, H7, L0, L1, L4, L5, U5, WB, WL, MP1]
family: [C0, F0, F1, F2, F3, F4, F7, G0, G4, H5, H7, L0, L1, L4, L5, U5, WB, WL, MP1]
fail-fast: false

steps:
Expand Down
2 changes: 2 additions & 0 deletions cmake/stm32/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(STM32_SUPPORTED_FAMILIES_LONG_NAME
STM32C0
STM32F0 STM32F1 STM32F2 STM32F3 STM32F4 STM32F7
STM32G0 STM32G4
STM32H5
STM32H7_M4 STM32H7_M7
STM32L0 STM32L1 STM32L4 STM32L5
STM32U5
Expand Down Expand Up @@ -390,6 +391,7 @@ include(stm32/f4)
include(stm32/f7)
include(stm32/g0)
include(stm32/g4)
include(stm32/h5)
include(stm32/h7)
include(stm32/l0)
include(stm32/l1)
Expand Down
31 changes: 31 additions & 0 deletions cmake/stm32/devices.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,37 @@ set(STM32_ALL_DEVICES
G4A1RE
G4A1VE
GBK1CB
H503CB
H503EB
H503KB
H503RB
H562AG
H562AI
H562IG
H562II
H562RG
H562RI
H562VG
H562VI
H562ZG
H562ZI
H563AG
H563AI
H563IG
H563II
H563MI
H563RG
H563RI
H563VG
H563VI
H563ZG
H563ZI
H573AI
H573II
H573MI
H573RI
H573VI
H573ZI
H723VE
H723VG
H723ZE
Expand Down
23 changes: 23 additions & 0 deletions cmake/stm32/h5.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set(STM32_H5_TYPES
H503xx H562xx H563xx H573xx
)

set(STM32_H5_TYPE_MATCH
"H503.." "H562.." "H563.." "H573.."
)
set(STM32_H5_RAM_SIZES
32K 640K 640K 640K
)
set(STM32_H5_CCRAM_SIZES
0K 0K 0K 0K
)

stm32_util_create_family_targets(H5)

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

target_link_options(STM32::H5 INTERFACE
-mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mthumb
)
10 changes: 6 additions & 4 deletions cmake/stm32/utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ endfunction()
include(FetchContent)

# A CMSIS or HAL driver can specify 'cube' as version number to indicate that the driver is taken from the Cube repository
set(STM32_FETCH_FAMILIES C0 F0 F1 F2 F3 F4 F7 G0 G4 H7 L0 L1 L4 L5 MP1 U5 WB WL )
set(STM32_FETCH_CUBE_VERSIONS v1.1.0 v1.11.2 v1.8.4 v1.9.3 v1.11.2 v1.26.1 v1.16.1 v1.4.1 v1.4.0 v1.9.0 v1.12.0 v1.10.3 v1.17.0 v1.4.0 1.5.0 v1.3.0 v1.12.0 v1.1.0)
set(STM32_FETCH_CMSIS_VERSIONS v1.1.0 v2.3.5 v4.3.3 v2.2.5 v2.3.5 v2.6.6 v1.2.6 v1.4.0 v1.2.1 v1.10.0 v1.9.1 v2.3.2 v1.7.1 v1.0.4 cube v1.3.0 v1.9.0 v1.1.0)
set(STM32_FETCH_HAL_VERSIONS v1.1.0 v1.7.5 v1.1.8 v1.2.7 v1.5.5 v1.7.12 v1.2.9 v1.4.1 v1.2.1 v1.10.0 v1.10.4 v1.4.4 v1.13.0 v1.0.4 cube v1.3.0 v1.9.0 v1.1.0)
set(STM32_FETCH_FAMILIES C0 F0 F1 F2 F3 F4 F7 G0 G4 H5 H7 L0 L1 L4 L5 MP1 U5 WB WL )
set(STM32_FETCH_CUBE_VERSIONS v1.1.0 v1.11.2 v1.8.4 v1.9.3 v1.11.2 v1.26.1 v1.16.1 v1.4.1 v1.4.0 v1.1.0 v1.9.0 v1.12.0 v1.10.3 v1.17.0 v1.4.0 1.5.0 v1.3.0 v1.12.0 v1.1.0)
set(STM32_FETCH_CMSIS_VERSIONS v1.1.0 v2.3.5 v4.3.3 v2.2.5 v2.3.5 v2.6.6 v1.2.6 v1.4.0 v1.2.1 v1.1.0 v1.10.0 v1.9.1 v2.3.2 v1.7.1 v1.0.4 cube v1.3.0 v1.9.0 v1.1.0)

set(STM32_FETCH_HAL_VERSIONS v1.1.0 v1.7.5 v1.1.8 v1.2.7 v1.5.5 v1.7.12 v1.2.9 v1.4.1 v1.2.1 v1.1.0 v1.10.0 v1.10.4 v1.4.4 v1.13.0 v1.0.4 cube v1.3.0 v1.9.0 v1.1.0)



FetchContent_Declare(
Expand Down
27 changes: 27 additions & 0 deletions docs/MAINTAIN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Supporting new families

## Write device file

a file <family>.cmake must be added to the folder cmake/stm32
This file containes the differents devices and the regex used to parse them.
It also give information on the RAM and CCRAM available

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Maintainer must check than Flash sizes correspond to usual suffix. Some families have exceptions.
  • add the suffix or hint file containing the sufix to size code

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make a suggestion with all the changes you want here ?

## Add family to list of know families

Update the list `STM32_SUPPORTED_FAMILIES_LONG_NAME` located in the cmake/stm32/common.cmake file

## Add devices to list of devices in devices.cmake

Hish15 marked this conversation as resolved.
Show resolved Hide resolved
Add all known devices to the list of all devices

## Update cube, cmsis and hal version in utilities.cmake

The versions to use can be found as follow:
- Cube version : a valid tag from the repo https://github.com/STMicroelectronics/STM32Cube${FAMILY}
- Cmsis version : a valid tag from the repo https://github.com/STMicroelectronics/cmsis_device_${FAMILY_L}
- Hal version : a valid tag from the repo https://github.com/STMicroelectronics/stm32${FAMILY_L}xx_hal_driver

## Add family to CI

Add the file stm32${FAMILY_L}xx_hal_conf.h file to the root folder of each test. (A template is provided in the corresponding HAL)
Update the cmake.yml workflow file to include the new family
atsju marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading