Skip to content

Commit 483c954

Browse files
Aurentiaco35fpistm
andauthored
STM32H7B0VBTX board variant added to the boards (stm32duino#2387)
* STM32H7B0VBTX board variant added to the boards tested everything works like expected for STM32H7B0VBT. I tested specificly for STM32H7B0VBT in my project. Signed-off-by: Aurentiaco35 <[email protected]> Co-authored-by: Frederic Pillon <[email protected]>
1 parent f69757c commit 483c954

File tree

4 files changed

+287
-2
lines changed

4 files changed

+287
-2
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,10 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
583583
| :green_heart: | STM32H757AI | Generic Board | *2.0.0* | |
584584
| :green_heart: | STM32H757II | Generic Board | *2.0.0* | |
585585
| :green_heart: | STM32H757XI | Generic Board | *2.7.0* | |
586+
| :yellow_heart: | STM32H7A3VGHX<br>STM32H7A3VGTX | Generic Board | **2.8.0** | |
587+
| :yellow_heart: | STM32H7A3VIHX<br>STM32H7A3VITX | Generic Board | **2.8.0** | |
588+
| :yellow_heart: | STM32H7B0VBTX | Generic Board | **2.8.0** | |
589+
| :yellow_heart: | STM32H7B3VIHX<br>STM32H7B3VITX | Generic Board | **2.8.0** | |
586590

587591
### Generic STM32L0 boards
588592

boards.txt

+56
Original file line numberDiff line numberDiff line change
@@ -7967,6 +7967,62 @@ GenH7.menu.pnum.GENERIC_H757XIHX.build.board=GENERIC_H757XIHX
79677967
GenH7.menu.pnum.GENERIC_H757XIHX.build.product_line=STM32H757xx
79687968
GenH7.menu.pnum.GENERIC_H757XIHX.build.variant=STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH
79697969

7970+
# Generic H7A3VGHx
7971+
GenH7.menu.pnum.GENERIC_H7A3VGHX=Generic H7A3VGHx
7972+
GenH7.menu.pnum.GENERIC_H7A3VGHX.upload.maximum_size=1048576
7973+
GenH7.menu.pnum.GENERIC_H7A3VGHX.upload.maximum_data_size=1048576
7974+
GenH7.menu.pnum.GENERIC_H7A3VGHX.build.board=GENERIC_H7A3VGHX
7975+
GenH7.menu.pnum.GENERIC_H7A3VGHX.build.product_line=STM32H7A3xx
7976+
GenH7.menu.pnum.GENERIC_H7A3VGHX.build.variant=STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)
7977+
7978+
# Generic H7A3VIHx
7979+
GenH7.menu.pnum.GENERIC_H7A3VIHX=Generic H7A3VIHx
7980+
GenH7.menu.pnum.GENERIC_H7A3VIHX.upload.maximum_size=2097152
7981+
GenH7.menu.pnum.GENERIC_H7A3VIHX.upload.maximum_data_size=1048576
7982+
GenH7.menu.pnum.GENERIC_H7A3VIHX.build.board=GENERIC_H7A3VIHX
7983+
GenH7.menu.pnum.GENERIC_H7A3VIHX.build.product_line=STM32H7A3xx
7984+
GenH7.menu.pnum.GENERIC_H7A3VIHX.build.variant=STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)
7985+
7986+
# Generic H7A3VGTx
7987+
GenH7.menu.pnum.GENERIC_H7A3VGTX=Generic H7A3VGTx
7988+
GenH7.menu.pnum.GENERIC_H7A3VGTX.upload.maximum_size=1048576
7989+
GenH7.menu.pnum.GENERIC_H7A3VGTX.upload.maximum_data_size=1048576
7990+
GenH7.menu.pnum.GENERIC_H7A3VGTX.build.board=GENERIC_H7A3VGTX
7991+
GenH7.menu.pnum.GENERIC_H7A3VGTX.build.product_line=STM32H7A3xx
7992+
GenH7.menu.pnum.GENERIC_H7A3VGTX.build.variant=STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)
7993+
7994+
# Generic H7A3VITx
7995+
GenH7.menu.pnum.GENERIC_H7A3VITX=Generic H7A3VITx
7996+
GenH7.menu.pnum.GENERIC_H7A3VITX.upload.maximum_size=2097152
7997+
GenH7.menu.pnum.GENERIC_H7A3VITX.upload.maximum_data_size=1048576
7998+
GenH7.menu.pnum.GENERIC_H7A3VITX.build.board=GENERIC_H7A3VITX
7999+
GenH7.menu.pnum.GENERIC_H7A3VITX.build.product_line=STM32H7A3xx
8000+
GenH7.menu.pnum.GENERIC_H7A3VITX.build.variant=STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)
8001+
8002+
# Generic H7B0VBTx
8003+
GenH7.menu.pnum.GENERIC_H7B0VBTX=Generic H7B0VBTx
8004+
GenH7.menu.pnum.GENERIC_H7B0VBTX.upload.maximum_size=131072
8005+
GenH7.menu.pnum.GENERIC_H7B0VBTX.upload.maximum_data_size=1048576
8006+
GenH7.menu.pnum.GENERIC_H7B0VBTX.build.board=GENERIC_H7B0VBTX
8007+
GenH7.menu.pnum.GENERIC_H7B0VBTX.build.product_line=STM32H7B0xx
8008+
GenH7.menu.pnum.GENERIC_H7B0VBTX.build.variant=STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)
8009+
8010+
# Generic H7B3VIHx
8011+
GenH7.menu.pnum.GENERIC_H7B3VIHX=Generic H7B3VIHx
8012+
GenH7.menu.pnum.GENERIC_H7B3VIHX.upload.maximum_size=2097152
8013+
GenH7.menu.pnum.GENERIC_H7B3VIHX.upload.maximum_data_size=1048576
8014+
GenH7.menu.pnum.GENERIC_H7B3VIHX.build.board=GENERIC_H7B3VIHX
8015+
GenH7.menu.pnum.GENERIC_H7B3VIHX.build.product_line=STM32H7B3xx
8016+
GenH7.menu.pnum.GENERIC_H7B3VIHX.build.variant=STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)
8017+
8018+
# Generic H7B3VITx
8019+
GenH7.menu.pnum.GENERIC_H7B3VITX=Generic H7B3VITx
8020+
GenH7.menu.pnum.GENERIC_H7B3VITX.upload.maximum_size=2097152
8021+
GenH7.menu.pnum.GENERIC_H7B3VITX.upload.maximum_data_size=1048576
8022+
GenH7.menu.pnum.GENERIC_H7B3VITX.build.board=GENERIC_H7B3VITX
8023+
GenH7.menu.pnum.GENERIC_H7B3VITX.build.product_line=STM32H7B3xx
8024+
GenH7.menu.pnum.GENERIC_H7B3VITX.build.variant=STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)
8025+
79708026
# Upload menu
79718027
GenH7.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
79728028
GenH7.menu.upload_method.swdMethod.upload.protocol=0

variants/STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)/generic_clock.c

+52-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,58 @@
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+
/*AXI clock gating */
30+
RCC->CKGAENR = 0xFFFFFFFF;
31+
32+
/** Supply configuration update enable
33+
*/
34+
HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY);
35+
36+
/** Configure the main internal regulator output voltage
37+
*/
38+
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0);
39+
40+
while (!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {}
41+
42+
/** Initializes the RCC Oscillators according to the specified parameters
43+
* in the RCC_OscInitTypeDef structure.
44+
*/
45+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
46+
RCC_OscInitStruct.HSIState = RCC_HSI_DIV1;
47+
RCC_OscInitStruct.HSICalibrationValue = 64;
48+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
49+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
50+
RCC_OscInitStruct.PLL.PLLM = 4;
51+
RCC_OscInitStruct.PLL.PLLN = 12;
52+
RCC_OscInitStruct.PLL.PLLP = 2;
53+
RCC_OscInitStruct.PLL.PLLQ = 2;
54+
RCC_OscInitStruct.PLL.PLLR = 2;
55+
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_3;
56+
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE;
57+
RCC_OscInitStruct.PLL.PLLFRACN = 4096;
58+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
59+
Error_Handler();
60+
}
61+
62+
/** Initializes the CPU, AHB and APB buses clocks
63+
*/
64+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
65+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2
66+
| RCC_CLOCKTYPE_D3PCLK1 | RCC_CLOCKTYPE_D1PCLK1;
67+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
68+
RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1;
69+
RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV1;
70+
RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2;
71+
RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2;
72+
RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2;
73+
RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2;
74+
75+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) {
76+
Error_Handler();
77+
}
2878
}
2979

3080
#endif /* ARDUINO_GENERIC_* */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
/*
2+
******************************************************************************
3+
**
4+
** File : LinkerScript.ld
5+
**
6+
** Author : STM32CubeIDE
7+
**
8+
** Abstract : Linker script for STM32H7 series
9+
** 128Kbytes FLASH and 1376Kbytes 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) 2023 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) + LENGTH(RAM); /* 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+
FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
48+
DTCMRAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
49+
DTCMRAM2 (xrw) : ORIGIN = 0x20010000, LENGTH = 64K
50+
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = LD_MAX_DATA_SIZE
51+
RAM_CD (xrw) : ORIGIN = 0x30000000, LENGTH = 128K
52+
RAM_SRD (xrw) : ORIGIN = 0x38000000, LENGTH = 32K
53+
}
54+
55+
/* Define output sections */
56+
SECTIONS
57+
{
58+
/* The startup code goes first into FLASH */
59+
.isr_vector :
60+
{
61+
. = ALIGN(4);
62+
KEEP(*(.isr_vector)) /* Startup code */
63+
. = ALIGN(4);
64+
} >FLASH
65+
66+
/* The program code and other data goes into FLASH */
67+
.text :
68+
{
69+
. = ALIGN(4);
70+
*(.text) /* .text sections (code) */
71+
*(.text*) /* .text* sections (code) */
72+
*(.glue_7) /* glue arm to thumb code */
73+
*(.glue_7t) /* glue thumb to arm code */
74+
*(.eh_frame)
75+
76+
KEEP (*(.init))
77+
KEEP (*(.fini))
78+
79+
. = ALIGN(4);
80+
_etext = .; /* define a global symbols at end of code */
81+
} >FLASH
82+
83+
/* Constant data goes into FLASH */
84+
.rodata :
85+
{
86+
. = ALIGN(4);
87+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
88+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
89+
. = ALIGN(4);
90+
} >FLASH
91+
92+
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
93+
.ARM : {
94+
__exidx_start = .;
95+
*(.ARM.exidx*)
96+
__exidx_end = .;
97+
} >FLASH
98+
99+
.preinit_array :
100+
{
101+
PROVIDE_HIDDEN (__preinit_array_start = .);
102+
KEEP (*(.preinit_array*))
103+
PROVIDE_HIDDEN (__preinit_array_end = .);
104+
} >FLASH
105+
106+
.init_array :
107+
{
108+
PROVIDE_HIDDEN (__init_array_start = .);
109+
KEEP (*(SORT(.init_array.*)))
110+
KEEP (*(.init_array*))
111+
PROVIDE_HIDDEN (__init_array_end = .);
112+
} >FLASH
113+
114+
.fini_array :
115+
{
116+
PROVIDE_HIDDEN (__fini_array_start = .);
117+
KEEP (*(SORT(.fini_array.*)))
118+
KEEP (*(.fini_array*))
119+
PROVIDE_HIDDEN (__fini_array_end = .);
120+
} >FLASH
121+
122+
/* used by the startup to initialize data */
123+
_sidata = LOADADDR(.data);
124+
125+
/* Initialized data sections goes into RAM, load LMA copy after code */
126+
.data :
127+
{
128+
. = ALIGN(4);
129+
_sdata = .; /* create a global symbol at data start */
130+
*(.data) /* .data sections */
131+
*(.data*) /* .data* sections */
132+
*(.RamFunc) /* .RamFunc sections */
133+
*(.RamFunc*) /* .RamFunc* sections */
134+
135+
. = ALIGN(4);
136+
_edata = .; /* define a global symbol at data end */
137+
} >RAM AT> FLASH
138+
139+
/* Uninitialized data section */
140+
. = ALIGN(4);
141+
.bss :
142+
{
143+
/* This is used by the startup in order to initialize the .bss section */
144+
_sbss = .; /* define a global symbol at bss start */
145+
__bss_start__ = _sbss;
146+
*(.bss)
147+
*(.bss*)
148+
*(COMMON)
149+
150+
. = ALIGN(4);
151+
_ebss = .; /* define a global symbol at bss end */
152+
__bss_end__ = _ebss;
153+
} >RAM
154+
155+
/* User_heap_stack section, used to check that there is enough RAM left */
156+
._user_heap_stack :
157+
{
158+
. = ALIGN(8);
159+
PROVIDE ( end = . );
160+
PROVIDE ( _end = . );
161+
. = . + _Min_Heap_Size;
162+
. = . + _Min_Stack_Size;
163+
. = ALIGN(8);
164+
} >RAM
165+
166+
/* Remove information from the standard libraries */
167+
/DISCARD/ :
168+
{
169+
libc.a ( * )
170+
libm.a ( * )
171+
libgcc.a ( * )
172+
}
173+
174+
.ARM.attributes 0 : { *(.ARM.attributes) }
175+
}

0 commit comments

Comments
 (0)