Skip to content

Commit 0b9a774

Browse files
authored
Merge pull request #15099 from jeromecoutant/PR_H723
STM32H7: enable more custom boards
2 parents d5d6688 + ea4c7fa commit 0b9a774

35 files changed

+8683
-7
lines changed

targets/TARGET_STM/TARGET_STM32H7/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
add_subdirectory(TARGET_STM32H723xG EXCLUDE_FROM_ALL)
5+
add_subdirectory(TARGET_STM32H725xE EXCLUDE_FROM_ALL)
46
add_subdirectory(TARGET_STM32H743xI EXCLUDE_FROM_ALL)
57
add_subdirectory(TARGET_STM32H745xI EXCLUDE_FROM_ALL)
68
add_subdirectory(TARGET_STM32H747xI EXCLUDE_FROM_ALL)
9+
add_subdirectory(TARGET_STM32H750xB EXCLUDE_FROM_ALL)
710
add_subdirectory(TARGET_STM32H7A3xIQ EXCLUDE_FROM_ALL)
811
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
912

targets/TARGET_STM/TARGET_STM32H7/PeripheralNames.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ typedef enum {
6969
I2C_1 = (int)I2C1_BASE,
7070
I2C_2 = (int)I2C2_BASE,
7171
I2C_3 = (int)I2C3_BASE,
72-
I2C_4 = (int)I2C4_BASE
72+
I2C_4 = (int)I2C4_BASE,
73+
#if I2C5_BASE
74+
I2C_5 = (int)I2C5_BASE,
75+
#endif
7376
} I2CName;
7477

7578
typedef enum {
@@ -81,18 +84,29 @@ typedef enum {
8184
PWM_3 = (int)TIM3_BASE,
8285
PWM_4 = (int)TIM4_BASE,
8386
PWM_5 = (int)TIM5_BASE,
87+
PWM_6 = (int)TIM6_BASE,
88+
PWM_7 = (int)TIM7_BASE,
8489
PWM_8 = (int)TIM8_BASE,
8590
PWM_12 = (int)TIM12_BASE,
8691
PWM_13 = (int)TIM13_BASE,
8792
PWM_14 = (int)TIM14_BASE,
8893
PWM_15 = (int)TIM15_BASE,
8994
PWM_16 = (int)TIM16_BASE,
90-
PWM_17 = (int)TIM17_BASE
95+
PWM_17 = (int)TIM17_BASE,
96+
#if TIM23_BASE
97+
PWM_23 = (int)TIM23_BASE,
98+
#endif
99+
#if TIM24_BASE
100+
PWM_24 = (int)TIM24_BASE,
101+
#endif
91102
} PWMName;
92103

93104
typedef enum {
94105
CAN_1 = (int)FDCAN1_BASE,
95-
CAN_2 = (int)FDCAN2_BASE
106+
CAN_2 = (int)FDCAN2_BASE,
107+
#if FDCAN3_BASE
108+
CAN_3 = (int)FDCAN3_BASE,
109+
#endif
96110
} CANName;
97111

98112
typedef enum {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32h723xx.S)
6+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32h723xg.ld)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32h723xx.S)
9+
set(LINKER_FILE TOOLCHAIN_ARM/stm32h723xg.sct)
10+
endif()
11+
12+
add_library(mbed-stm32h723xg INTERFACE)
13+
14+
target_include_directories(mbed-stm32h723xg
15+
INTERFACE
16+
.
17+
)
18+
19+
target_sources(mbed-stm32h723xg
20+
INTERFACE
21+
${STARTUP_FILE}
22+
)
23+
24+
mbed_set_linker_script(mbed-stm32h723xg ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
25+
26+
target_link_libraries(mbed-stm32h723xg INTERFACE mbed-stm32h7)

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H723xG/TOOLCHAIN_ARM/startup_stm32h723xx.S

Lines changed: 573 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m7
2+
; Scatter-Loading Description File
3+
;
4+
; SPDX-License-Identifier: BSD-3-Clause
5+
;******************************************************************************
6+
;* @attention
7+
;*
8+
;* Copyright (c) 2016-2020 STMicroelectronics.
9+
;* All rights reserved.
10+
;*
11+
;* This software component is licensed by ST under BSD 3-Clause license,
12+
;* the "License"; You may not use this file except in compliance with the
13+
;* License. You may obtain a copy of the License at:
14+
;* opensource.org/licenses/BSD-3-Clause
15+
;*
16+
;******************************************************************************
17+
18+
#include "../cmsis_nvic.h"
19+
20+
#if !defined(MBED_APP_START)
21+
#define MBED_APP_START MBED_ROM_START
22+
#endif
23+
24+
#if !defined(MBED_APP_SIZE)
25+
#define MBED_APP_SIZE MBED_ROM_SIZE
26+
#endif
27+
28+
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
29+
/* This value is normally defined by the tools to 0x1000 for bare metal and 0x400 for RTOS */
30+
#if defined(MBED_BOOT_STACK_SIZE)
31+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
32+
#else
33+
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
34+
#endif
35+
#endif
36+
37+
/* Round up VECTORS_SIZE to 8 bytes */
38+
#define VECTORS_SIZE (((NVIC_NUM_VECTORS * 4) + 7) AND ~7)
39+
40+
LR_IROM1 MBED_APP_START MBED_APP_SIZE {
41+
42+
ER_IROM1 MBED_APP_START MBED_APP_SIZE {
43+
*.o (RESET, +First)
44+
*(InRoot$$Sections)
45+
.ANY (+RO)
46+
}
47+
48+
RW_IRAM1 (MBED_RAM_START + VECTORS_SIZE) { ; RW data
49+
.ANY (+RW +ZI)
50+
}
51+
52+
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (MBED_RAM_START + MBED_RAM_SIZE - MBED_CONF_TARGET_BOOT_STACK_SIZE - AlignExpr(ImageLimit(RW_IRAM1), 16)) { ; Heap growing up
53+
}
54+
55+
ARM_LIB_STACK (MBED_RAM_START + MBED_RAM_SIZE) EMPTY -MBED_CONF_TARGET_BOOT_STACK_SIZE { ; Stack region growing down
56+
}
57+
}

0 commit comments

Comments
 (0)