Skip to content

Commit 0f19393

Browse files
committed
Create new variant files
Ive mostly filled out the .h and .cpp files Still need to update some of the defines The .ld file is copied verbatim from the seed The .c file still needs to be modified
1 parent 8b45666 commit 0f19393

File tree

4 files changed

+1222
-0
lines changed

4 files changed

+1222
-0
lines changed
Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
/*
2+
******************************************************************************
3+
**
4+
** File : LinkerScript.ld
5+
**
6+
** Author : Auto-generated by STM32CubeIDE
7+
**
8+
** Abstract : Linker script for Daisy Seed Board embedding STM32H750IBKx Device from STM32H7 series
9+
** 128Kbytes FLASH
10+
** 128Kbytes DTCMRAM
11+
** 64Kbytes ITCMRAM
12+
** 512Kbytes RAM_D1
13+
** 288Kbytes RAM_D2
14+
** 64Kbytes RAM_D3
15+
**
16+
** Set heap size, stack size and stack location according
17+
** to application requirements.
18+
**
19+
** Set memory bank area and size if external memory is used.
20+
**
21+
** Target : STMicroelectronics STM32
22+
**
23+
** Distribution: The file is distributed as is without any warranty
24+
** of any kind.
25+
**
26+
*****************************************************************************
27+
** @attention
28+
**
29+
** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
30+
**
31+
** Redistribution and use in source and binary forms, with or without modification,
32+
** are permitted provided that the following conditions are met:
33+
** 1. Redistributions of source code must retain the above copyright notice,
34+
** this list of conditions and the following disclaimer.
35+
** 2. Redistributions in binary form must reproduce the above copyright notice,
36+
** this list of conditions and the following disclaimer in the documentation
37+
** and/or other materials provided with the distribution.
38+
** 3. Neither the name of STMicroelectronics nor the names of its contributors
39+
** may be used to endorse or promote products derived from this software
40+
** without specific prior written permission.
41+
**
42+
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
43+
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44+
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
45+
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
46+
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47+
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
48+
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
49+
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
50+
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
51+
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52+
**
53+
*****************************************************************************
54+
*/
55+
56+
/* Entry Point */
57+
ENTRY(Reset_Handler)
58+
59+
/* Highest address of the user mode stack */
60+
_estack = 0x24080000; /* end of "RAM_D1" Ram type memory */
61+
62+
_Min_Heap_Size = 0x200; /* required amount of heap */
63+
_Min_Stack_Size = 0x400; /* required amount of stack */
64+
65+
/* Memories definition */
66+
MEMORY
67+
{
68+
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
69+
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
70+
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
71+
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
72+
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
73+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
74+
SDRAM (xrw) : ORIGIN = 0xC0000000, LENGTH = 64M
75+
QSPIFLASH (xr) : ORIGIN = 0x90000000, LENGTH = 8M
76+
}
77+
78+
/* Sections */
79+
SECTIONS
80+
{
81+
/* The startup code into "FLASH" Rom type memory */
82+
.isr_vector :
83+
{
84+
. = ALIGN(4);
85+
KEEP(*(.isr_vector)) /* Startup code */
86+
. = ALIGN(4);
87+
} >FLASH
88+
89+
/* The program code and other data into "FLASH" Rom type memory */
90+
.text :
91+
{
92+
. = ALIGN(4);
93+
*(.text) /* .text sections (code) */
94+
*(.text*) /* .text* sections (code) */
95+
*(.glue_7) /* glue arm to thumb code */
96+
*(.glue_7t) /* glue thumb to arm code */
97+
*(.eh_frame)
98+
99+
KEEP (*(.init))
100+
KEEP (*(.fini))
101+
102+
. = ALIGN(4);
103+
_etext = .; /* define a global symbols at end of code */
104+
} >FLASH
105+
106+
/* Constant data into "FLASH" Rom type memory */
107+
.rodata :
108+
{
109+
. = ALIGN(4);
110+
*(.rodata) /* .rodata sections (constants, strings, etc.) */
111+
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
112+
. = ALIGN(4);
113+
} >FLASH
114+
115+
.ARM.extab : {
116+
. = ALIGN(4);
117+
*(.ARM.extab* .gnu.linkonce.armextab.*)
118+
. = ALIGN(4);
119+
} >FLASH
120+
121+
.ARM : {
122+
. = ALIGN(4);
123+
__exidx_start = .;
124+
*(.ARM.exidx*)
125+
__exidx_end = .;
126+
. = ALIGN(4);
127+
} >FLASH
128+
129+
.preinit_array :
130+
{
131+
. = ALIGN(4);
132+
PROVIDE_HIDDEN (__preinit_array_start = .);
133+
KEEP (*(.preinit_array*))
134+
PROVIDE_HIDDEN (__preinit_array_end = .);
135+
. = ALIGN(4);
136+
} >FLASH
137+
138+
.init_array :
139+
{
140+
. = ALIGN(4);
141+
PROVIDE_HIDDEN (__init_array_start = .);
142+
KEEP (*(SORT(.init_array.*)))
143+
KEEP (*(.init_array*))
144+
PROVIDE_HIDDEN (__init_array_end = .);
145+
. = ALIGN(4);
146+
} >FLASH
147+
148+
.fini_array :
149+
{
150+
. = ALIGN(4);
151+
PROVIDE_HIDDEN (__fini_array_start = .);
152+
KEEP (*(SORT(.fini_array.*)))
153+
KEEP (*(.fini_array*))
154+
PROVIDE_HIDDEN (__fini_array_end = .);
155+
. = ALIGN(4);
156+
} >FLASH
157+
158+
/* Used by the startup to initialize data */
159+
_sidata = LOADADDR(.data);
160+
161+
/* Initialized data sections into "RAM_D1" Ram type memory */
162+
.data :
163+
{
164+
. = ALIGN(4);
165+
_sdata = .; /* create a global symbol at data start */
166+
*(.data) /* .data sections */
167+
*(.data*) /* .data* sections */
168+
169+
. = ALIGN(4);
170+
_edata = .; /* define a global symbol at data end */
171+
172+
} >RAM_D1 AT> FLASH
173+
174+
/* Uninitialized data section into "RAM_D1" Ram type memory */
175+
. = ALIGN(4);
176+
.bss :
177+
{
178+
/* This is used by the startup in order to initialize the .bss section */
179+
_sbss = .; /* define a global symbol at bss start */
180+
__bss_start__ = _sbss;
181+
*(.bss)
182+
*(.bss*)
183+
*(COMMON)
184+
185+
. = ALIGN(4);
186+
_ebss = .; /* define a global symbol at bss end */
187+
__bss_end__ = _ebss;
188+
} >RAM_D1
189+
190+
.sram1_bss (NOLOAD) :
191+
{
192+
. = ALIGN(4);
193+
_ssram1_bss = .;
194+
PROVIDE(__sram1_bss_start = _ssram1_bss);
195+
*(.sram1_bss)
196+
*(.sram1_bss*)
197+
. = ALIGN(4);
198+
_esram1_bss = .;
199+
PROVIDE(__sram1_bss_end = _esram1_bss);
200+
} >RAM_D2
201+
202+
/* User_heap_stack section, used to check that there is enough "RAM_D1" Ram type memory left */
203+
._user_heap_stack :
204+
{
205+
. = ALIGN(8);
206+
PROVIDE ( end = . );
207+
PROVIDE ( _end = . );
208+
. = . + _Min_Heap_Size;
209+
. = . + _Min_Stack_Size;
210+
. = ALIGN(8);
211+
} >RAM_D1
212+
213+
/* Uninitialized data section called "SDRAM_BSS" */
214+
/* Variables, etc. must be explicitly placed here */
215+
/* can be assigned by using: */
216+
/* int variable __attribute__((section(".sdram_bss"))) foo; */
217+
.sdram_bss (NOLOAD) :
218+
{
219+
. = ALIGN(4);
220+
_ssdram_bss = .;
221+
PROVIDE(__sdram_bss_start = _ssdram_bss);
222+
*(.sdram_bss)
223+
*(.sdram_bss*)
224+
. = ALIGN(4);
225+
_esdram_bss = .;
226+
PROVIDE(__sdram_bss_end = _esdram_bss);
227+
} >SDRAM
228+
229+
/* Remove information from the compiler libraries */
230+
/DISCARD/ :
231+
{
232+
libc.a ( * )
233+
libm.a ( * )
234+
libgcc.a ( * )
235+
}
236+
237+
.ARM.attributes 0 : { *(.ARM.attributes) }
238+
}

0 commit comments

Comments
 (0)