Skip to content

Commit 3ba6e95

Browse files
alextricalcparata
authored andcommitted
variant: add Generic F2xx Boards (stm32duino#1794)
| 💛 | STM32F205RB<br>STM32F205RC<br>STM32F205RE<br>STM32F205RF | Generic Board | **2.4.0** | | | 💛 | STM32F205VB<br>STM32F205VC<br>STM32F205VE<br>STM32F205VF<br>STM32F205VG | Generic Board | **2.4.0** | | | 💛 | STM32F205ZC<br>STM32F205ZE<br>STM32F205ZF<br>STM32F205ZG | Generic Board | **2.4.0** | | | 💛 | STM32F207IC<br>STM32F207IE<br>STM32F207IF<br>STM32F207IG | Generic Board | **2.4.0** | | | 💛 | STM32F207VC<br>STM32F207VE<br>STM32F207VF<br>STM32F207VG | Generic Board | **2.4.0** | | | 💛 | STM32F215RE<br>STM32F215RG | Generic Board | **2.4.0** | | | 💛 | STM32F215VE<br>STM32F215VG | Generic Board | **2.4.0** | | | 💛 | STM32F215ZE<br>STM32F215ZG | Generic Board | **2.4.0** | | | 💛 | STM32F217IE<br>STM32F217IG | Generic Board | **2.4.0** | | | 💛 | STM32F217VE<br>STM32F217VG | Generic Board | **2.4.0** | |
1 parent 324896d commit 3ba6e95

File tree

12 files changed

+1428
-10
lines changed

12 files changed

+1428
-10
lines changed

Diff for: README.md

+10
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,17 @@ User can add a STM32 based board following this [wiki](https://github.com/stm32d
221221

222222
| Status | Device(s) | Name | Release | Notes |
223223
| :----: | :-------: | ---- | :-----: | :---- |
224+
| :yellow_heart: | STM32F205RB<br>STM32F205RC<br>STM32F205RE<br>STM32F205RF | Generic Board | **2.4.0** | |
225+
| :yellow_heart: | STM32F205VB<br>STM32F205VC<br>STM32F205VE<br>STM32F205VF<br>STM32F205VG | Generic Board | **2.4.0** | |
226+
| :yellow_heart: | STM32F205ZC<br>STM32F205ZE<br>STM32F205ZF<br>STM32F205ZG | Generic Board | **2.4.0** | |
227+
| :yellow_heart: | STM32F207IC<br>STM32F207IE<br>STM32F207IF<br>STM32F207IG | Generic Board | **2.4.0** | |
228+
| :yellow_heart: | STM32F207VC<br>STM32F207VE<br>STM32F207VF<br>STM32F207VG | Generic Board | **2.4.0** | |
224229
| :green_heart: | STM32F207ZC<br>STM32F207ZE<br>STM32F207ZF<br>STM32F207ZG | Generic Board | *2.0.0* | |
230+
| :yellow_heart: | STM32F215RE<br>STM32F215RG | Generic Board | **2.4.0** | |
231+
| :yellow_heart: | STM32F215VE<br>STM32F215VG | Generic Board | **2.4.0** | |
232+
| :yellow_heart: | STM32F215ZE<br>STM32F215ZG | Generic Board | **2.4.0** | |
233+
| :yellow_heart: | STM32F217IE<br>STM32F217IG | Generic Board | **2.4.0** | |
234+
| :yellow_heart: | STM32F217VE<br>STM32F217VG | Generic Board | **2.4.0** | |
225235
| :green_heart: | STM32F217ZE<br>STM32F217ZG | Generic Board | *2.0.0* | |
226236

227237
### Generic STM32F3 boards

Diff for: boards.txt

+328
Large diffs are not rendered by default.

Diff for: variants/STM32F2xx/F205RE(T-Y)_F205R(B-C-F)T_F205RG(E-T-Y)_F215R(E-G)T/generic_clock.c

+31-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,37 @@
2424
*/
2525
WEAK void SystemClock_Config(void)
2626
{
27-
/* SystemClock_Config can be generated by STM32CubeMX */
28-
#warning "SystemClock_Config() is empty. Default clock at reset is used."
27+
RCC_OscInitTypeDef RCC_OscInitStruct = {};
28+
RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
29+
30+
/** Initializes the RCC Oscillators according to the specified parameters
31+
* in the RCC_OscInitTypeDef structure.
32+
*/
33+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
34+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
35+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
36+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
37+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
38+
RCC_OscInitStruct.PLL.PLLM = 13;
39+
RCC_OscInitStruct.PLL.PLLN = 195;
40+
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
41+
RCC_OscInitStruct.PLL.PLLQ = 5;
42+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
43+
Error_Handler();
44+
}
45+
46+
/** Initializes the CPU, AHB and APB buses clocks
47+
*/
48+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
49+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
50+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
51+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
52+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
53+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
54+
55+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) {
56+
Error_Handler();
57+
}
2958
}
3059

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

Diff for: variants/STM32F2xx/F205V(B-C-E-F-G)T_F215V(E-G)T/generic_clock.c

+31-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,37 @@
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+
/** Initializes the RCC Oscillators according to the specified parameters
30+
* in the RCC_OscInitTypeDef structure.
31+
*/
32+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
33+
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
34+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
35+
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
36+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
37+
RCC_OscInitStruct.PLL.PLLM = 13;
38+
RCC_OscInitStruct.PLL.PLLN = 195;
39+
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
40+
RCC_OscInitStruct.PLL.PLLQ = 5;
41+
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
42+
Error_Handler();
43+
}
44+
45+
/** Initializes the CPU, AHB and APB buses clocks
46+
*/
47+
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
48+
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
49+
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
50+
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
51+
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
52+
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
53+
54+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK) {
55+
Error_Handler();
56+
}
2857
}
2958

3059
#endif /* ARDUINO_GENERIC_* */

0 commit comments

Comments
 (0)