Skip to content

Commit 986aaf9

Browse files
authored
Merge pull request #320 from Hish15/P2H/develop_H5
Integration of H5 family
2 parents 274dc90 + fb8cbae commit 986aaf9

File tree

10 files changed

+2042
-5
lines changed

10 files changed

+2042
-5
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-20.04
1212
strategy:
1313
matrix:
14-
family: [C0, F0, F1, F2, F3, F4, F7, G0, G4, H7, L0, L1, L4, L5, U5, WB, WL, MP1]
14+
family: [C0, F0, F1, F2, F3, F4, F7, G0, G4, H5, H7, L0, L1, L4, L5, U5, WB, WL, MP1]
1515
fail-fast: false
1616

1717
steps:

cmake/stm32/common.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ set(STM32_SUPPORTED_FAMILIES_LONG_NAME
22
STM32C0
33
STM32F0 STM32F1 STM32F2 STM32F3 STM32F4 STM32F7
44
STM32G0 STM32G4
5+
STM32H5
56
STM32H7_M4 STM32H7_M7
67
STM32L0 STM32L1 STM32L4 STM32L5
78
STM32U5
@@ -390,6 +391,7 @@ include(stm32/f4)
390391
include(stm32/f7)
391392
include(stm32/g0)
392393
include(stm32/g4)
394+
include(stm32/h5)
393395
include(stm32/h7)
394396
include(stm32/l0)
395397
include(stm32/l1)

cmake/stm32/devices.cmake

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,37 @@ set(STM32_ALL_DEVICES
718718
G4A1RE
719719
G4A1VE
720720
GBK1CB
721+
H503CB
722+
H503EB
723+
H503KB
724+
H503RB
725+
H562AG
726+
H562AI
727+
H562IG
728+
H562II
729+
H562RG
730+
H562RI
731+
H562VG
732+
H562VI
733+
H562ZG
734+
H562ZI
735+
H563AG
736+
H563AI
737+
H563IG
738+
H563II
739+
H563MI
740+
H563RG
741+
H563RI
742+
H563VG
743+
H563VI
744+
H563ZG
745+
H563ZI
746+
H573AI
747+
H573II
748+
H573MI
749+
H573RI
750+
H573VI
751+
H573ZI
721752
H723VE
722753
H723VG
723754
H723ZE

cmake/stm32/h5.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
set(STM32_H5_TYPES
2+
H503xx H562xx H563xx H573xx
3+
)
4+
5+
set(STM32_H5_TYPE_MATCH
6+
"H503.." "H562.." "H563.." "H573.."
7+
)
8+
set(STM32_H5_RAM_SIZES
9+
32K 640K 640K 640K
10+
)
11+
set(STM32_H5_CCRAM_SIZES
12+
0K 0K 0K 0K
13+
)
14+
15+
stm32_util_create_family_targets(H5)
16+
17+
target_compile_options(STM32::H5 INTERFACE
18+
-mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mthumb
19+
)
20+
21+
target_link_options(STM32::H5 INTERFACE
22+
-mcpu=cortex-m33 -mfloat-abi=hard -mfpu=fpv5-sp-d16 -mthumb
23+
)

cmake/stm32/utilities.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ endfunction()
4343
include(FetchContent)
4444

4545
# A CMSIS or HAL driver can specify 'cube' as version number to indicate that the driver is taken from the Cube repository
46-
set(STM32_FETCH_FAMILIES C0 F0 F1 F2 F3 F4 F7 G0 G4 H7 L0 L1 L4 L5 MP1 U5 WB WL )
47-
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)
48-
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)
49-
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)
46+
set(STM32_FETCH_FAMILIES C0 F0 F1 F2 F3 F4 F7 G0 G4 H5 H7 L0 L1 L4 L5 MP1 U5 WB WL )
47+
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)
48+
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)
49+
50+
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)
51+
5052

5153

5254
FetchContent_Declare(

docs/MAINTAIN.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Supporting new families
2+
3+
## Write device file
4+
5+
a file <family>.cmake must be added to the folder cmake/stm32
6+
This file containes the differents devices and the regex used to parse them.
7+
It also give information on the RAM and CCRAM available
8+
9+
## Add family to list of know families
10+
11+
Update the list `STM32_SUPPORTED_FAMILIES_LONG_NAME` located in the cmake/stm32/common.cmake file
12+
13+
## Add devices to list of devices in devices.cmake
14+
15+
Add all known devices to the list of all devices
16+
17+
## Update cube, cmsis and hal version in utilities.cmake
18+
19+
The versions to use can be found as follow:
20+
- Cube version : a valid tag from the repo https://github.com/STMicroelectronics/STM32Cube${FAMILY}
21+
- Cmsis version : a valid tag from the repo https://github.com/STMicroelectronics/cmsis_device_${FAMILY_L}
22+
- Hal version : a valid tag from the repo https://github.com/STMicroelectronics/stm32${FAMILY_L}xx_hal_driver
23+
24+
## Add family to CI
25+
26+
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)
27+
Update the cmake.yml workflow file to include the new family

0 commit comments

Comments
 (0)