Skip to content

Commit a43419e

Browse files
variants(h7): add generic H723Z(E-G)T, H730ZBT and H733ZGT
Signed-off-by: yetanothercarbot <55005345+yetanothercarbot@users.noreply.github.com> Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 77c96a3 commit a43419e

File tree

4 files changed

+259
-3
lines changed

4 files changed

+259
-3
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
498498

499499
| Status | Device(s) | Name | Release | Notes |
500500
| :----: | :-------: | ---- | :-----: | :---- |
501+
| :yellow_heart: | STM32H723ZE<br>STM32H723ZG | Generic Board | **2.4.0** | |
502+
| :yellow_heart: | STM32H730ZBT | Generic Board | **2.4.0** | |
503+
| :yellow_heart: | STM32H733ZGT | Generic Board | **2.4.0** | |
501504
| :green_heart: | STM32H742IG<br>STM32H742II | Generic Board | *2.1.0* | |
502505
| :green_heart: | STM32H742VG<br>STM32H742VI | Generic Board | *2.0.0* | |
503506
| :green_heart: | STM32H742ZG<br>STM32H742ZI | Generic Board | *2.0.0* | |

boards.txt

+32
Original file line numberDiff line numberDiff line change
@@ -7063,6 +7063,38 @@ GenH7.menu.pnum.WeActMiniH750VBTX.build.variant=STM32H7xx/H742V(G-I)(H-T)_H743V(
70637063
GenH7.menu.pnum.WeActMiniH750VBTX.build.variant_h=variant_WeActMiniH7xx.h
70647064
GenH7.menu.pnum.WeActMiniH750VBTX.build.peripheral_pins=-DCUSTOM_PERIPHERAL_PINS
70657065

7066+
# Generic H723ZETx
7067+
GenH7.menu.pnum.GENERIC_H723ZETX=Generic H723ZETx
7068+
GenH7.menu.pnum.GENERIC_H723ZETX.upload.maximum_size=524288
7069+
GenH7.menu.pnum.GENERIC_H723ZETX.upload.maximum_data_size=327680
7070+
GenH7.menu.pnum.GENERIC_H723ZETX.build.board=GENERIC_H723ZETX
7071+
GenH7.menu.pnum.GENERIC_H723ZETX.build.product_line=STM32H723xx
7072+
GenH7.menu.pnum.GENERIC_H723ZETX.build.variant=STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT
7073+
7074+
# Generic H723ZGTx
7075+
GenH7.menu.pnum.GENERIC_H723ZGTX=Generic H723ZGTx
7076+
GenH7.menu.pnum.GENERIC_H723ZGTX.upload.maximum_size=1048576
7077+
GenH7.menu.pnum.GENERIC_H723ZGTX.upload.maximum_data_size=327680
7078+
GenH7.menu.pnum.GENERIC_H723ZGTX.build.board=GENERIC_H723ZGTX
7079+
GenH7.menu.pnum.GENERIC_H723ZGTX.build.product_line=STM32H723xx
7080+
GenH7.menu.pnum.GENERIC_H723ZGTX.build.variant=STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT
7081+
7082+
# Generic H730ZBTx
7083+
GenH7.menu.pnum.GENERIC_H730ZBTX=Generic H730ZBTx
7084+
GenH7.menu.pnum.GENERIC_H730ZBTX.upload.maximum_size=131072
7085+
GenH7.menu.pnum.GENERIC_H730ZBTX.upload.maximum_data_size=327680
7086+
GenH7.menu.pnum.GENERIC_H730ZBTX.build.board=GENERIC_H730ZBTX
7087+
GenH7.menu.pnum.GENERIC_H730ZBTX.build.product_line=STM32H730xx
7088+
GenH7.menu.pnum.GENERIC_H730ZBTX.build.variant=STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT
7089+
7090+
# Generic H733ZGTx
7091+
GenH7.menu.pnum.GENERIC_H733ZGTX=Generic H733ZGTx
7092+
GenH7.menu.pnum.GENERIC_H733ZGTX.upload.maximum_size=1048576
7093+
GenH7.menu.pnum.GENERIC_H733ZGTX.upload.maximum_data_size=327680
7094+
GenH7.menu.pnum.GENERIC_H733ZGTX.build.board=GENERIC_H733ZGTX
7095+
GenH7.menu.pnum.GENERIC_H733ZGTX.build.product_line=STM32H733xx
7096+
GenH7.menu.pnum.GENERIC_H733ZGTX.build.variant=STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT
7097+
70667098
# Generic H742IGKx
70677099
GenH7.menu.pnum.GENERIC_H742IGKX=Generic H742IGKx
70687100
GenH7.menu.pnum.GENERIC_H742IGKX.upload.maximum_size=1048576

variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/generic_clock.c

+50-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,55 @@
2121
*/
2222
WEAK void SystemClock_Config(void)
2323
{
24-
/* SystemClock_Config can be generated by STM32CubeMX */
25-
#warning "SystemClock_Config() is empty. Default clock at reset is used."
26-
}
24+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
25+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
26+
27+
/** Supply configuration update enable
28+
*/
29+
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
30+
31+
/** Configure the main internal regulator output voltage
32+
*/
33+
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
34+
35+
while (!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
2736

37+
/** Initializes the RCC Oscillators according to the specified parameters
38+
* in the RCC_OscInitTypeDef structure.
39+
*/
40+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48 | RCC_OSCILLATORTYPE_HSI;
41+
RCC_OscInitStruct.HSIState = RCC_HSI_DIV1;
42+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
43+
RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
44+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
45+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
46+
RCC_OscInitStruct.PLL.PLLM = 4;
47+
RCC_OscInitStruct.PLL.PLLN = 34;
48+
RCC_OscInitStruct.PLL.PLLP = 1;
49+
RCC_OscInitStruct.PLL.PLLQ = 4;
50+
RCC_OscInitStruct.PLL.PLLR = 2;
51+
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
52+
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
53+
RCC_OscInitStruct.PLL.PLLFRACN = 0;
54+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
55+
Error_Handler();
56+
}
57+
58+
/** Initializes the CPU, AHB and APB buses clocks
59+
*/
60+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
61+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2
62+
| RCC_CLOCKTYPE_D3PCLK1 | RCC_CLOCKTYPE_D1PCLK1;
63+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
64+
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
65+
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
66+
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
67+
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
68+
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
69+
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
70+
71+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) {
72+
Error_Handler();
73+
}
74+
}
2875
#endif /* ARDUINO_GENERIC_* */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/*
2+
******************************************************************************
3+
**
4+
** File : LinkerScript.ld
5+
**
6+
** Author : STM32CubeIDE
7+
**
8+
** Abstract : Linker script for STM32H7 series
9+
** 1024Kbytes FLASH and 560Kbytes RAM
10+
**
11+
** Set heap size, stack size and stack location according
12+
** to application requirements.
13+
**
14+
** Set memory bank area and size if external memory is used.
15+
**
16+
** Target : STMicroelectronics STM32
17+
**
18+
** Distribution: The file is distributed as is, without any warranty
19+
** of any kind.
20+
**
21+
*****************************************************************************
22+
** @attention
23+
**
24+
** Copyright (c) 2022 STMicroelectronics.
25+
** All rights reserved.
26+
**
27+
** This software is licensed under terms that can be found in the LICENSE file
28+
** in the root directory of this software component.
29+
** If no LICENSE file comes with this software, it is provided AS-IS.
30+
**
31+
****************************************************************************
32+
*/
33+
34+
/* Entry Point */
35+
ENTRY(Reset_Handler)
36+
37+
/* Highest address of the user mode stack */
38+
_estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of RAM */
39+
/* Generate a link error if heap and stack don't fit into RAM */
40+
_Min_Heap_Size = 0x200 ; /* required amount of heap */
41+
_Min_Stack_Size = 0x400 ; /* required amount of stack */
42+
43+
/* Specify the memory areas */
44+
MEMORY
45+
{
46+
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
47+
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
48+
FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
49+
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = LD_MAX_DATA_SIZE
50+
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 32K
51+
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 16K
52+
}
53+
54+
/* Define output sections */
55+
SECTIONS
56+
{
57+
/* The startup code goes first into FLASH */
58+
.isr_vector :
59+
{
60+
. = ALIGN(4);
61+
KEEP(*(.isr_vector)) /* Startup code */
62+
. = ALIGN(4);
63+
} >FLASH
64+
65+
/* The program code and other data goes into FLASH */
66+
.text :
67+
{
68+
. = ALIGN(4);
69+
*(.text) /* .text sections (code) */
70+
*(.text*) /* .text* sections (code) */
71+
*(.glue_7) /* glue arm to thumb code */
72+
*(.glue_7t) /* glue thumb to arm code */
73+
*(.eh_frame)
74+
75+
KEEP (*(.init))
76+
KEEP (*(.fini))
77+
78+
. = ALIGN(4);
79+
_etext = .; /* define a global symbols at end of code */
80+
} >FLASH
81+
82+
/* Constant data goes into FLASH */
83+
.rodata :
84+
{
85+
. = ALIGN(4);
86+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
87+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
88+
. = ALIGN(4);
89+
} >FLASH
90+
91+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
92+
.ARM : {
93+
__exidx_start = .;
94+
*(.ARM.exidx*)
95+
__exidx_end = .;
96+
} >FLASH
97+
98+
.preinit_array :
99+
{
100+
PROVIDE_HIDDEN (__preinit_array_start = .);
101+
KEEP (*(.preinit_array*))
102+
PROVIDE_HIDDEN (__preinit_array_end = .);
103+
} >FLASH
104+
105+
.init_array :
106+
{
107+
PROVIDE_HIDDEN (__init_array_start = .);
108+
KEEP (*(SORT(.init_array.*)))
109+
KEEP (*(.init_array*))
110+
PROVIDE_HIDDEN (__init_array_end = .);
111+
} >FLASH
112+
113+
.fini_array :
114+
{
115+
PROVIDE_HIDDEN (__fini_array_start = .);
116+
KEEP (*(SORT(.fini_array.*)))
117+
KEEP (*(.fini_array*))
118+
PROVIDE_HIDDEN (__fini_array_end = .);
119+
} >FLASH
120+
121+
/* used by the startup to initialize data */
122+
_sidata = LOADADDR(.data);
123+
124+
/* Initialized data sections goes into RAM, load LMA copy after code */
125+
.data :
126+
{
127+
. = ALIGN(4);
128+
_sdata = .; /* create a global symbol at data start */
129+
*(.data) /* .data sections */
130+
*(.data*) /* .data* sections */
131+
*(.RamFunc) /* .RamFunc sections */
132+
*(.RamFunc*) /* .RamFunc* sections */
133+
134+
. = ALIGN(4);
135+
_edata = .; /* define a global symbol at data end */
136+
} >RAM_D1 AT> FLASH
137+
138+
/* Uninitialized data section */
139+
. = ALIGN(4);
140+
.bss :
141+
{
142+
/* This is used by the startup in order to initialize the .bss section */
143+
_sbss = .; /* define a global symbol at bss start */
144+
__bss_start__ = _sbss;
145+
*(.bss)
146+
*(.bss*)
147+
*(COMMON)
148+
149+
. = ALIGN(4);
150+
_ebss = .; /* define a global symbol at bss end */
151+
__bss_end__ = _ebss;
152+
} >RAM_D1
153+
154+
/* User_heap_stack section, used to check that there is enough RAM left */
155+
._user_heap_stack :
156+
{
157+
. = ALIGN(8);
158+
PROVIDE ( end = . );
159+
PROVIDE ( _end = . );
160+
. = . + _Min_Heap_Size;
161+
. = . + _Min_Stack_Size;
162+
. = ALIGN(8);
163+
} >RAM_D1
164+
165+
/* Remove information from the standard libraries */
166+
/DISCARD/ :
167+
{
168+
libc.a ( * )
169+
libm.a ( * )
170+
libgcc.a ( * )
171+
}
172+
173+
.ARM.attributes 0 : { *(.ARM.attributes) }
174+
}

0 commit comments

Comments
 (0)