Skip to content

Commit 16cbc1a

Browse files
committed
add support for stm32F407IGHx
1 parent eebd0e3 commit 16cbc1a

File tree

2 files changed

+217
-0
lines changed

2 files changed

+217
-0
lines changed

Diff for: boards.txt

+9
Original file line numberDiff line numberDiff line change
@@ -4865,6 +4865,15 @@ GenF4.menu.pnum.GENERIC_F407ZGTX.build.product_line=STM32F407xx
48654865
GenF4.menu.pnum.GENERIC_F407ZGTX.build.variant=STM32F4xx/F407Z(E-G)T_F417Z(E-G)T
48664866
GenF4.menu.pnum.GENERIC_F407ZGTX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32F4xx/STM32F407.svd
48674867

4868+
# Generic F407IGHx
4869+
GenF4.menu.pnum.GENERIC_F407IGHX=Generic F407IGHx
4870+
GenF4.menu.pnum.GENERIC_F407IGHX.upload.maximum_size=524288
4871+
GenF4.menu.pnum.GENERIC_F407IGHX.upload.maximum_data_size=131072
4872+
GenF4.menu.pnum.GENERIC_F407IGHX.build.board=GENERIC_F407IGHX
4873+
GenF4.menu.pnum.GENERIC_F407IGHX.build.product_line=STM32F407xx
4874+
GenF4.menu.pnum.GENERIC_F407IGHX.build.variant=STM32F4xx/F407I(E-G)(H-T)_F417I(E-G)(H-T)
4875+
GenF4.menu.pnum.GENERIC_F407IGHX.debug.svd_file={runtime.tools.STM32_SVD.path}/svd/STM32F4xx/STM32F407.svd
4876+
48684877
# Generic F410C8Tx
48694878
GenF4.menu.pnum.GENERIC_F410C8TX=Generic F410C8Tx
48704879
GenF4.menu.pnum.GENERIC_F410C8TX.upload.maximum_size=65536
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
/*
2+
******************************************************************************
3+
**
4+
** @file : LinkerScript.ld
5+
**
6+
** @author : Auto-generated by STM32CubeIDE
7+
**
8+
** @brief : Linker script for STM32F407IGHx Device from STM32F4 series
9+
** 1024KBytes FLASH
10+
** 64KBytes CCMRAM
11+
** 128KBytes RAM
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) 2024 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+
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
49+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
50+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
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 (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
91+
{
92+
. = ALIGN(4);
93+
*(.ARM.extab* .gnu.linkonce.armextab.*)
94+
. = ALIGN(4);
95+
} >FLASH
96+
97+
.ARM (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
98+
{
99+
. = ALIGN(4);
100+
__exidx_start = .;
101+
*(.ARM.exidx*)
102+
__exidx_end = .;
103+
. = ALIGN(4);
104+
} >FLASH
105+
106+
.preinit_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
107+
{
108+
. = ALIGN(4);
109+
PROVIDE_HIDDEN (__preinit_array_start = .);
110+
KEEP (*(.preinit_array*))
111+
PROVIDE_HIDDEN (__preinit_array_end = .);
112+
. = ALIGN(4);
113+
} >FLASH
114+
115+
.init_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
116+
{
117+
. = ALIGN(4);
118+
PROVIDE_HIDDEN (__init_array_start = .);
119+
KEEP (*(SORT(.init_array.*)))
120+
KEEP (*(.init_array*))
121+
PROVIDE_HIDDEN (__init_array_end = .);
122+
. = ALIGN(4);
123+
} >FLASH
124+
125+
.fini_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
126+
{
127+
. = ALIGN(4);
128+
PROVIDE_HIDDEN (__fini_array_start = .);
129+
KEEP (*(SORT(.fini_array.*)))
130+
KEEP (*(.fini_array*))
131+
PROVIDE_HIDDEN (__fini_array_end = .);
132+
. = ALIGN(4);
133+
} >FLASH
134+
135+
/* Used by the startup to initialize data */
136+
_sidata = LOADADDR(.data);
137+
138+
/* Initialized data sections into "RAM" Ram type memory */
139+
.data :
140+
{
141+
. = ALIGN(4);
142+
_sdata = .; /* create a global symbol at data start */
143+
*(.data) /* .data sections */
144+
*(.data*) /* .data* sections */
145+
*(.RamFunc) /* .RamFunc sections */
146+
*(.RamFunc*) /* .RamFunc* sections */
147+
148+
. = ALIGN(4);
149+
_edata = .; /* define a global symbol at data end */
150+
151+
} >RAM AT> FLASH
152+
153+
_siccmram = LOADADDR(.ccmram);
154+
155+
/* CCM-RAM section
156+
*
157+
* IMPORTANT NOTE!
158+
* If initialized variables will be placed in this section,
159+
* the startup code needs to be modified to copy the init-values.
160+
*/
161+
.ccmram :
162+
{
163+
. = ALIGN(4);
164+
_sccmram = .; /* create a global symbol at ccmram start */
165+
*(.ccmram)
166+
*(.ccmram*)
167+
168+
. = ALIGN(4);
169+
_eccmram = .; /* create a global symbol at ccmram end */
170+
} >CCMRAM AT> FLASH
171+
172+
/* Uninitialized data section into "RAM" Ram type memory */
173+
. = ALIGN(4);
174+
.bss :
175+
{
176+
/* This is used by the startup in order to initialize the .bss section */
177+
_sbss = .; /* define a global symbol at bss start */
178+
__bss_start__ = _sbss;
179+
*(.bss)
180+
*(.bss*)
181+
*(COMMON)
182+
183+
. = ALIGN(4);
184+
_ebss = .; /* define a global symbol at bss end */
185+
__bss_end__ = _ebss;
186+
} >RAM
187+
188+
/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
189+
._user_heap_stack :
190+
{
191+
. = ALIGN(8);
192+
PROVIDE ( end = . );
193+
PROVIDE ( _end = . );
194+
. = . + _Min_Heap_Size;
195+
. = . + _Min_Stack_Size;
196+
. = ALIGN(8);
197+
} >RAM
198+
199+
/* Remove information from the compiler libraries */
200+
/DISCARD/ :
201+
{
202+
libc.a ( * )
203+
libm.a ( * )
204+
libgcc.a ( * )
205+
}
206+
207+
.ARM.attributes 0 : { *(.ARM.attributes) }
208+
}

0 commit comments

Comments
 (0)