Skip to content

Commit 5f1c07e

Browse files
jmartinez-silabsaustina-csa
authored andcommitted
[Silabs] Add support for EFR32MG26 boards (project-chip#34165)
* Add support for EFR32MG26 boards * update matter suppport submodule to get mg26 provision lib * Try to regroup all _include_dir together. List MCU include before ncp's for wifi ncp combos * Fixup missing define for the MCU family for ncp builds.
1 parent 35e6276 commit 5f1c07e

File tree

5 files changed

+405
-119
lines changed

5 files changed

+405
-119
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
/***************************************************************************//**
2+
* GCC Linker script for Silicon Labs devices
3+
*******************************************************************************
4+
* # License
5+
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
6+
*******************************************************************************
7+
*
8+
* SPDX-License-Identifier: Zlib
9+
*
10+
* The licensor of this software is Silicon Laboratories Inc.
11+
*
12+
* This software is provided 'as-is', without any express or implied
13+
* warranty. In no event will the authors be held liable for any damages
14+
* arising from the use of this software.
15+
*
16+
* Permission is granted to anyone to use this software for any purpose,
17+
* including commercial applications, and to alter it and redistribute it
18+
* freely, subject to the following restrictions:
19+
*
20+
* 1. The origin of this software must not be misrepresented; you must not
21+
* claim that you wrote the original software. If you use this software
22+
* in a product, an acknowledgment in the product documentation would be
23+
* appreciated but is not required.
24+
* 2. Altered source versions must be plainly marked as such, and must not be
25+
* misrepresented as being the original software.
26+
* 3. This notice may not be removed or altered from any source distribution.
27+
*
28+
******************************************************************************/
29+
30+
MEMORY
31+
{
32+
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x318000
33+
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x80000
34+
}
35+
36+
ENTRY(Reset_Handler)
37+
38+
SECTIONS
39+
{
40+
41+
.vectors :
42+
{
43+
linker_vectors_begin = .;
44+
KEEP(*(.vectors))
45+
linker_vectors_end = .;
46+
47+
__Vectors_End = .;
48+
__Vectors_Size = __Vectors_End - __Vectors;
49+
__lma_ramfuncs_start__ = .;
50+
} > FLASH
51+
52+
.stack (NOLOAD):
53+
{
54+
. = ALIGN(8);
55+
__StackLimit = .;
56+
KEEP(*(.stack*))
57+
. = ALIGN(4);
58+
__StackTop = .;
59+
PROVIDE(__stack = __StackTop);
60+
} > RAM
61+
62+
63+
.noinit (NOLOAD):
64+
{
65+
*(.noinit*);
66+
} > RAM
67+
68+
.bss :
69+
{
70+
. = ALIGN(4);
71+
__bss_start__ = .;
72+
*(SORT_BY_ALIGNMENT(.bss*))
73+
*(COMMON)
74+
. = ALIGN(4);
75+
__bss_end__ = .;
76+
} > RAM
77+
78+
text_application_ram :
79+
{
80+
. = ALIGN(4);
81+
__vma_ramfuncs_start__ = .;
82+
__text_application_ram_start__ = .;
83+
84+
*(text_application_ram)
85+
86+
. = ALIGN(4);
87+
__vma_ramfuncs_end__ = .;
88+
__text_application_ram_end__ = .;
89+
} > RAM AT > FLASH
90+
91+
.rodata :
92+
{
93+
__lma_ramfuncs_end__ = .;
94+
__rodata_start__ = .;
95+
__rodata_end__ = .;
96+
} > FLASH
97+
98+
.text :
99+
{
100+
linker_code_begin = .;
101+
*(SORT_BY_ALIGNMENT(.text*))
102+
*(SORT_BY_ALIGNMENT(text_*))
103+
. = ALIGN(32);
104+
linker_code_end = .;
105+
106+
KEEP(*(.init))
107+
KEEP(*(.fini))
108+
109+
/* .ctors */
110+
*crtbegin.o(.ctors)
111+
*crtbegin?.o(.ctors)
112+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
113+
*(SORT(.ctors.*))
114+
*(.ctors)
115+
116+
/* .dtors */
117+
*crtbegin.o(.dtors)
118+
*crtbegin?.o(.dtors)
119+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
120+
*(SORT(.dtors.*))
121+
*(.dtors)
122+
123+
*(.rodata*)
124+
*(.eh_frame*)
125+
} > FLASH
126+
127+
.ARM.extab :
128+
{
129+
*(.ARM.extab* .gnu.linkonce.armextab.*)
130+
} > FLASH
131+
132+
__exidx_start = .;
133+
.ARM.exidx :
134+
{
135+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
136+
} > FLASH
137+
__exidx_end = .;
138+
139+
.copy.table :
140+
{
141+
. = ALIGN(4);
142+
__copy_table_start__ = .;
143+
144+
LONG (__etext)
145+
LONG (__data_start__)
146+
LONG ((__data_end__ - __data_start__) / 4)
147+
148+
/* Add each additional data section here */
149+
/*
150+
LONG (__etext2)
151+
LONG (__data2_start__)
152+
LONG ((__data2_end__ - __data2_start__) / 4)
153+
*/
154+
155+
__copy_table_end__ = .;
156+
} > FLASH
157+
158+
.zero.table :
159+
{
160+
. = ALIGN(4);
161+
__zero_table_start__ = .;
162+
/* Add each additional bss section here */
163+
/*
164+
LONG (__bss2_start__)
165+
LONG ((__bss2_end__ - __bss2_start__) / 4)
166+
*/
167+
168+
__zero_table_end__ = .;
169+
__etext = .;
170+
} > FLASH
171+
172+
.data :
173+
{
174+
. = ALIGN(4);
175+
__data_start__ = .;
176+
*(vtable)
177+
*(SORT_BY_ALIGNMENT(.data*))
178+
. = ALIGN(4);
179+
180+
. = ALIGN(4);
181+
/* preinit data */
182+
PROVIDE_HIDDEN (__preinit_array_start = .);
183+
KEEP(*(.preinit_array))
184+
PROVIDE_HIDDEN (__preinit_array_end = .);
185+
186+
. = ALIGN(4);
187+
/* init data */
188+
PROVIDE_HIDDEN (__init_array_start = .);
189+
KEEP(*(SORT(.init_array.*)))
190+
KEEP(*(.init_array))
191+
PROVIDE_HIDDEN (__init_array_end = .);
192+
193+
. = ALIGN(4);
194+
/* finit data */
195+
PROVIDE_HIDDEN (__fini_array_start = .);
196+
KEEP(*(SORT(.fini_array.*)))
197+
KEEP(*(.fini_array))
198+
PROVIDE_HIDDEN (__fini_array_end = .);
199+
200+
. = ALIGN(4);
201+
/* All data end */
202+
__data_end__ = .;
203+
204+
} > RAM AT > FLASH
205+
.memory_manager_heap (NOLOAD):
206+
{
207+
. = ALIGN(8);
208+
__HeapBase = .;
209+
__end__ = .;
210+
end = __end__;
211+
_end = __end__;
212+
KEEP(*(.memory_manager_heap*))
213+
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
214+
} > RAM
215+
216+
__heap_size = __HeapLimit - __HeapBase;
217+
__ram_end__ = 0x20000000 + 0x80000;
218+
__main_flash_end__ = 0x8006000 + 0x318000;
219+
220+
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured
221+
* block sizes and then "place" them at the end of flash when the size is known. */
222+
.internal_storage (DSECT) : {
223+
KEEP(*(.internal_storage*))
224+
} > FLASH
225+
226+
227+
.nvm (DSECT) : {
228+
KEEP(*(.simee*))
229+
} > FLASH
230+
231+
__ramfuncs_start__ = __vma_ramfuncs_start__;
232+
__ramfuncs_end__ = __vma_ramfuncs_end__;
233+
234+
linker_nvm_end = __main_flash_end__;
235+
linker_nvm_begin = linker_nvm_end - SIZEOF(.nvm);
236+
linker_storage_end = linker_nvm_begin;
237+
__nvm3Base = linker_nvm_begin;
238+
239+
linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage);
240+
ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !")
241+
242+
243+
app_flash_end = 0x8006000 + 0x318000;
244+
ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= app_flash_end, "NVM3 is excessing the flash size !")
245+
}

0 commit comments

Comments
 (0)