Skip to content

Commit 137ac7b

Browse files
committed
Added Generic Varient for STM32H733VGT
1 parent 9cc7f13 commit 137ac7b

File tree

4 files changed

+239
-2
lines changed

4 files changed

+239
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
628628
| :green_heart: | STM32H7B0VBTX | Generic Board | *2.8.0* | |
629629
| :green_heart: | STM32H7B3VIHX<br>STM32H7B3VITX | Generic Board | *2.8.0* | |
630630
| :green_heart: | STM32H7B3ZITxQ | Generic Board | *2.10.0* | |
631+
| :yellow_heart: | STM32H733VGT | Generic Board | *2.12.0* | |
631632

632633
### Generic STM32L0 boards
633634

boards.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9425,6 +9425,15 @@ GenH7.menu.pnum.GENERIC_H730ZBTX.build.product_line=STM32H730xx
94259425
GenH7.menu.pnum.GENERIC_H730ZBTX.build.variant=STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT
94269426
GenH7.menu.pnum.GENERIC_H730ZBTX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32H7xx/STM32H730.svd
94279427

9428+
# Generic H733VGTx
9429+
GenH7.menu.pnum.GENERIC_H733VGTX=Generic H733VGTx
9430+
GenH7.menu.pnum.GENERIC_H733VGTX.upload.maximum_size=1048576
9431+
GenH7.menu.pnum.GENERIC_H733VGTX.upload.maximum_data_size=577536
9432+
GenH7.menu.pnum.GENERIC_H733VGTX.build.board=GENERIC_H733VGTX
9433+
GenH7.menu.pnum.GENERIC_H733VGTX.build.product_line=STM32H733xx
9434+
GenH7.menu.pnum.GENERIC_H733VGTX.build.variant=STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)
9435+
GenH7.menu.pnum.GENERIC_H733VGTX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32H7xx/STM32H733.svd
9436+
94289437
# Generic H733ZGTx
94299438
GenH7.menu.pnum.GENERIC_H733ZGTX=Generic H733ZGTx
94309439
GenH7.menu.pnum.GENERIC_H733ZGTX.upload.maximum_size=1048576

variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/generic_clock.c

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,57 @@
2323
*/
2424
WEAK void SystemClock_Config(void)
2525
{
26-
/* SystemClock_Config can be generated by STM32CubeMX */
27-
#warning "SystemClock_Config() is empty. Default clock at reset is used."
26+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
27+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
28+
29+
/** Supply configuration update enable
30+
*/
31+
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
32+
33+
/** Configure the main internal regulator output voltage
34+
*/
35+
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
36+
37+
while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
38+
39+
/** Initializes the RCC Oscillators according to the specified parameters
40+
* in the RCC_OscInitTypeDef structure.
41+
*/
42+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
43+
RCC_OscInitStruct.HSIState = RCC_HSI_DIV1;
44+
RCC_OscInitStruct.HSICalibrationValue = 64;
45+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
46+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
47+
RCC_OscInitStruct.PLL.PLLM = 4;
48+
RCC_OscInitStruct.PLL.PLLN = 34;
49+
RCC_OscInitStruct.PLL.PLLP = 1;
50+
RCC_OscInitStruct.PLL.PLLQ = 2;
51+
RCC_OscInitStruct.PLL.PLLR = 2;
52+
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
53+
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
54+
RCC_OscInitStruct.PLL.PLLFRACN = 3072;
55+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
56+
{
57+
Error_Handler();
58+
}
59+
60+
/** Initializes the CPU, AHB and APB buses clocks
61+
*/
62+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
63+
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2
64+
|RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1;
65+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
66+
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
67+
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2;
68+
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
69+
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
70+
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
71+
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
72+
73+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK)
74+
{
75+
Error_Handler();
76+
}
2877
}
2978

3079
#endif /* ARDUINO_GENERIC_* */
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
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) 2025 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 (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
92+
{
93+
*(.ARM.extab* .gnu.linkonce.armextab.*)
94+
} >FLASH
95+
.ARM (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
96+
{
97+
__exidx_start = .;
98+
*(.ARM.exidx*)
99+
__exidx_end = .;
100+
} >FLASH
101+
102+
.preinit_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
103+
{
104+
PROVIDE_HIDDEN (__preinit_array_start = .);
105+
KEEP (*(.preinit_array*))
106+
PROVIDE_HIDDEN (__preinit_array_end = .);
107+
} >FLASH
108+
109+
.init_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
110+
{
111+
PROVIDE_HIDDEN (__init_array_start = .);
112+
KEEP (*(SORT(.init_array.*)))
113+
KEEP (*(.init_array*))
114+
PROVIDE_HIDDEN (__init_array_end = .);
115+
} >FLASH
116+
117+
.fini_array (READONLY) : /* The READONLY keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
118+
{
119+
PROVIDE_HIDDEN (__fini_array_start = .);
120+
KEEP (*(SORT(.fini_array.*)))
121+
KEEP (*(.fini_array*))
122+
PROVIDE_HIDDEN (__fini_array_end = .);
123+
} >FLASH
124+
125+
/* used by the startup to initialize data */
126+
_sidata = LOADADDR(.data);
127+
128+
/* Initialized data sections goes into RAM, load LMA copy after code */
129+
.data :
130+
{
131+
. = ALIGN(4);
132+
_sdata = .; /* create a global symbol at data start */
133+
*(.data) /* .data sections */
134+
*(.data*) /* .data* sections */
135+
*(.RamFunc) /* .RamFunc sections */
136+
*(.RamFunc*) /* .RamFunc* sections */
137+
138+
. = ALIGN(4);
139+
_edata = .; /* define a global symbol at data end */
140+
} >RAM_D1 AT> FLASH
141+
142+
/* Uninitialized data section */
143+
. = ALIGN(4);
144+
.bss :
145+
{
146+
/* This is used by the startup in order to initialize the .bss section */
147+
_sbss = .; /* define a global symbol at bss start */
148+
__bss_start__ = _sbss;
149+
*(.bss)
150+
*(.bss*)
151+
*(COMMON)
152+
153+
. = ALIGN(4);
154+
_ebss = .; /* define a global symbol at bss end */
155+
__bss_end__ = _ebss;
156+
} >RAM_D1
157+
158+
/* User_heap_stack section, used to check that there is enough RAM left */
159+
._user_heap_stack :
160+
{
161+
. = ALIGN(8);
162+
PROVIDE ( end = . );
163+
PROVIDE ( _end = . );
164+
. = . + _Min_Heap_Size;
165+
. = . + _Min_Stack_Size;
166+
. = ALIGN(8);
167+
} >RAM_D1
168+
169+
/* Remove information from the standard libraries */
170+
/DISCARD/ :
171+
{
172+
libc.a ( * )
173+
libm.a ( * )
174+
libgcc.a ( * )
175+
}
176+
177+
.ARM.attributes 0 : { *(.ARM.attributes) }
178+
}

0 commit comments

Comments
 (0)