Skip to content

Commit 0dec214

Browse files
committed
Add some generic variants for STM32F7xx
Add the following generic variants: - STM32F722ZCTx - STM32F722ZETx - STM32F732ZETx
1 parent 15cf923 commit 0dec214

File tree

4 files changed

+257
-2
lines changed

4 files changed

+257
-2
lines changed

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
352352
| Status | Device(s) | Name | Release | Notes |
353353
| :----: | :-------: | ---- | :-----: | :---- |
354354
| :green_heart: | STM32F722RC<br>STM32F722RE | Generic Board | *2.3.0* | |
355+
| :yellow_heart: | STM32F722ZC<br>STM32F722ZE | Generic Board | **2.4.0** | |
355356
| :green_heart: | STM32F730R8<br>STM32F732RE | Generic Board | *2.3.0* | |
357+
| :yellow_heart: | STM32F732ZE | Generic Board | **2.4.0** | |
356358
| :green_heart: | STM32F745ZE<br>STM32F745ZG | Generic Board | *2.0.0* | |
357359
| :green_heart: | STM32F746BE<br>STM32F746BG<br>STM32F746NE<br>STM32F746NG | Generic Board | *2.0.0* | |
358360
| :green_heart: | STM32F746ZE<br>STM32F746ZG | Generic Board | *2.0.0* | |

Diff for: boards.txt

+24
Original file line numberDiff line numberDiff line change
@@ -4267,6 +4267,22 @@ GenF7.menu.pnum.GENERIC_F722RETX.build.board=GENERIC_F722RETX
42674267
GenF7.menu.pnum.GENERIC_F722RETX.build.product_line=STM32F722xx
42684268
GenF7.menu.pnum.GENERIC_F722RETX.build.variant=STM32F7xx/F722R(C-E)T_F730R8T_F732RET
42694269

4270+
# Generic F722ZCTx
4271+
GenF7.menu.pnum.GENERIC_F722ZCTX=Generic F722ZCTx
4272+
GenF7.menu.pnum.GENERIC_F722ZCTX.upload.maximum_size=262144
4273+
GenF7.menu.pnum.GENERIC_F722ZCTX.upload.maximum_data_size=196608
4274+
GenF7.menu.pnum.GENERIC_F722ZCTX.build.board=GENERIC_F722ZCTX
4275+
GenF7.menu.pnum.GENERIC_F722ZCTX.build.product_line=STM32F722xx
4276+
GenF7.menu.pnum.GENERIC_F722ZCTX.build.variant=STM32F7xx/F722Z(C-E)T_F732ZET
4277+
4278+
# Generic F722ZETx
4279+
GenF7.menu.pnum.GENERIC_F722ZETX=Generic F722ZETx
4280+
GenF7.menu.pnum.GENERIC_F722ZETX.upload.maximum_size=524288
4281+
GenF7.menu.pnum.GENERIC_F722ZETX.upload.maximum_data_size=196608
4282+
GenF7.menu.pnum.GENERIC_F722ZETX.build.board=GENERIC_F722ZETX
4283+
GenF7.menu.pnum.GENERIC_F722ZETX.build.product_line=STM32F722xx
4284+
GenF7.menu.pnum.GENERIC_F722ZETX.build.variant=STM32F7xx/F722Z(C-E)T_F732ZET
4285+
42704286
# Generic F730R8Tx
42714287
GenF7.menu.pnum.GENERIC_F730R8TX=Generic F730R8Tx
42724288
GenF7.menu.pnum.GENERIC_F730R8TX.upload.maximum_size=65536
@@ -4283,6 +4299,14 @@ GenF7.menu.pnum.GENERIC_F732RETX.build.board=GENERIC_F732RETX
42834299
GenF7.menu.pnum.GENERIC_F732RETX.build.product_line=STM32F732xx
42844300
GenF7.menu.pnum.GENERIC_F732RETX.build.variant=STM32F7xx/F722R(C-E)T_F730R8T_F732RET
42854301

4302+
# Generic F732ZETx
4303+
GenF7.menu.pnum.GENERIC_F732ZETX=Generic F732ZETx
4304+
GenF7.menu.pnum.GENERIC_F732ZETX.upload.maximum_size=524288
4305+
GenF7.menu.pnum.GENERIC_F732ZETX.upload.maximum_data_size=196608
4306+
GenF7.menu.pnum.GENERIC_F732ZETX.build.board=GENERIC_F732ZETX
4307+
GenF7.menu.pnum.GENERIC_F732ZETX.build.product_line=STM32F732xx
4308+
GenF7.menu.pnum.GENERIC_F732ZETX.build.variant=STM32F7xx/F722Z(C-E)T_F732ZET
4309+
42864310
# Generic F745ZETx
42874311
GenF7.menu.pnum.GENERIC_F745ZETX=Generic F745ZETx
42884312
GenF7.menu.pnum.GENERIC_F745ZETX.upload.maximum_size=524288

Diff for: variants/STM32F7xx/F722Z(C-E)T_F732ZET/generic_clock.c

+46-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,52 @@
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."
24+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
25+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
26+
27+
/** Configure LSE Drive Capability
28+
*/
29+
HAL_PWR_EnableBkUpAccess();
30+
31+
/** Configure the main internal regulator output voltage
32+
*/
33+
__HAL_RCC_PWR_CLK_ENABLE();
34+
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
35+
36+
/** Initializes the RCC Oscillators according to the specified parameters
37+
* in the RCC_OscInitTypeDef structure.
38+
*/
39+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
40+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
41+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
42+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
43+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
44+
RCC_OscInitStruct.PLL.PLLM = 8;
45+
RCC_OscInitStruct.PLL.PLLN = 216;
46+
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
47+
RCC_OscInitStruct.PLL.PLLQ = 9;
48+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
49+
Error_Handler();
50+
}
51+
52+
/** Activate the Over-Drive mode
53+
*/
54+
if (HAL_PWREx_EnableOverDrive() != 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_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
63+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
64+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
65+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
66+
67+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK) {
68+
Error_Handler();
69+
}
2670
}
2771

2872
#endif /* ARDUINO_GENERIC_* */

Diff for: variants/STM32F7xx/F722Z(C-E)T_F732ZET/ldscript.ld

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
/*
2+
******************************************************************************
3+
**
4+
** @file : LinkerScript.ld
5+
**
6+
** @author : Auto-generated by STM32CubeIDE
7+
**
8+
** Abstract : Linker script for NUCLEO-F722ZE Board embedding STM32F722ZETx Device from stm32f7 series
9+
** 512Kbytes FLASH
10+
** 256Kbytes RAM
11+
**
12+
** Set heap size, stack size and stack location according
13+
** to application requirements.
14+
**
15+
** Set memory bank area and size if external memory is used
16+
**
17+
** Target : STMicroelectronics STM32
18+
**
19+
** Distribution: The file is distributed as is, without any warranty
20+
** of any kind.
21+
**
22+
******************************************************************************
23+
** @attention
24+
**
25+
** Copyright (c) 2022 STMicroelectronics.
26+
** All rights reserved.
27+
**
28+
** This software is licensed under terms that can be found in the LICENSE file
29+
** in the root directory of this software component.
30+
** If no LICENSE file comes with this software, it is provided AS-IS.
31+
**
32+
******************************************************************************
33+
*/
34+
35+
/* Entry Point */
36+
ENTRY(Reset_Handler)
37+
38+
/* Highest address of the user mode stack */
39+
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
40+
41+
_Min_Heap_Size = 0x200; /* required amount of heap */
42+
_Min_Stack_Size = 0x400; /* required amount of stack */
43+
44+
/* Memories definition */
45+
MEMORY
46+
{
47+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
48+
FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
49+
}
50+
51+
/* Sections */
52+
SECTIONS
53+
{
54+
/* The startup code into "FLASH" Rom type memory */
55+
.isr_vector :
56+
{
57+
. = ALIGN(4);
58+
KEEP(*(.isr_vector)) /* Startup code */
59+
. = ALIGN(4);
60+
} >FLASH
61+
62+
/* The program code and other data into "FLASH" Rom type memory */
63+
.text :
64+
{
65+
. = ALIGN(4);
66+
*(.text) /* .text sections (code) */
67+
*(.text*) /* .text* sections (code) */
68+
*(.glue_7) /* glue arm to thumb code */
69+
*(.glue_7t) /* glue thumb to arm code */
70+
*(.eh_frame)
71+
72+
KEEP (*(.init))
73+
KEEP (*(.fini))
74+
75+
. = ALIGN(4);
76+
_etext = .; /* define a global symbols at end of code */
77+
} >FLASH
78+
79+
/* Constant data into "FLASH" Rom type memory */
80+
.rodata :
81+
{
82+
. = ALIGN(4);
83+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
84+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
85+
. = ALIGN(4);
86+
} >FLASH
87+
88+
.ARM.extab : {
89+
. = ALIGN(4);
90+
*(.ARM.extab* .gnu.linkonce.armextab.*)
91+
. = ALIGN(4);
92+
} >FLASH
93+
94+
.ARM : {
95+
. = ALIGN(4);
96+
__exidx_start = .;
97+
*(.ARM.exidx*)
98+
__exidx_end = .;
99+
. = ALIGN(4);
100+
} >FLASH
101+
102+
.preinit_array :
103+
{
104+
. = ALIGN(4);
105+
PROVIDE_HIDDEN (__preinit_array_start = .);
106+
KEEP (*(.preinit_array*))
107+
PROVIDE_HIDDEN (__preinit_array_end = .);
108+
. = ALIGN(4);
109+
} >FLASH
110+
111+
.init_array :
112+
{
113+
. = ALIGN(4);
114+
PROVIDE_HIDDEN (__init_array_start = .);
115+
KEEP (*(SORT(.init_array.*)))
116+
KEEP (*(.init_array*))
117+
PROVIDE_HIDDEN (__init_array_end = .);
118+
. = ALIGN(4);
119+
} >FLASH
120+
121+
.fini_array :
122+
{
123+
. = ALIGN(4);
124+
PROVIDE_HIDDEN (__fini_array_start = .);
125+
KEEP (*(SORT(.fini_array.*)))
126+
KEEP (*(.fini_array*))
127+
PROVIDE_HIDDEN (__fini_array_end = .);
128+
. = ALIGN(4);
129+
} >FLASH
130+
131+
/* Used by the startup to initialize data */
132+
_sidata = LOADADDR(.data);
133+
134+
/* Initialized data sections into "RAM" Ram type memory */
135+
.data :
136+
{
137+
. = ALIGN(4);
138+
_sdata = .; /* create a global symbol at data start */
139+
*(.data) /* .data sections */
140+
*(.data*) /* .data* sections */
141+
*(.RamFunc) /* .RamFunc sections */
142+
*(.RamFunc*) /* .RamFunc* sections */
143+
144+
. = ALIGN(4);
145+
_edata = .; /* define a global symbol at data end */
146+
147+
} >RAM AT> FLASH
148+
149+
/* Uninitialized data section into "RAM" Ram type memory */
150+
. = ALIGN(4);
151+
.bss :
152+
{
153+
/* This is used by the startup in order to initialize the .bss section */
154+
_sbss = .; /* define a global symbol at bss start */
155+
__bss_start__ = _sbss;
156+
*(.bss)
157+
*(.bss*)
158+
*(COMMON)
159+
160+
. = ALIGN(4);
161+
_ebss = .; /* define a global symbol at bss end */
162+
__bss_end__ = _ebss;
163+
} >RAM
164+
165+
/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
166+
._user_heap_stack :
167+
{
168+
. = ALIGN(8);
169+
PROVIDE ( end = . );
170+
PROVIDE ( _end = . );
171+
. = . + _Min_Heap_Size;
172+
. = . + _Min_Stack_Size;
173+
. = ALIGN(8);
174+
} >RAM
175+
176+
/* Remove information from the compiler libraries */
177+
/DISCARD/ :
178+
{
179+
libc.a ( * )
180+
libm.a ( * )
181+
libgcc.a ( * )
182+
}
183+
184+
.ARM.attributes 0 : { *(.ARM.attributes) }
185+
}

0 commit comments

Comments
 (0)