Skip to content

Commit 187365d

Browse files
committed
caracal support
1 parent f957643 commit 187365d

File tree

13 files changed

+454
-125
lines changed

13 files changed

+454
-125
lines changed
+261
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
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 = 0x20000004, LENGTH = 0x7fffc
34+
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
35+
}
36+
37+
ENTRY(Reset_Handler)
38+
39+
SECTIONS
40+
{
41+
42+
.vectors :
43+
{
44+
linker_vectors_begin = .;
45+
KEEP(*(.vectors))
46+
linker_vectors_end = .;
47+
48+
__Vectors_End = .;
49+
__Vectors_Size = __Vectors_End - __Vectors;
50+
__lma_ramfuncs_start__ = .;
51+
} > FLASH
52+
.bootloader_reset_section (NOLOAD):
53+
{
54+
__ResetReasonStart__ = .;
55+
. = . + 4;
56+
. = ALIGN(4);
57+
__ResetReasonEnd__ = .;
58+
} > BOOTLOADER_RESET_REGION
59+
60+
.stack (NOLOAD):
61+
{
62+
. = ALIGN(8);
63+
__StackLimit = .;
64+
KEEP(*(.stack*))
65+
. = ALIGN(4);
66+
__StackTop = .;
67+
PROVIDE(__stack = __StackTop);
68+
} > RAM
69+
70+
.bss :
71+
{
72+
. = ALIGN(4);
73+
__bss_start__ = .;
74+
*(SORT_BY_ALIGNMENT(.bss*))
75+
*(COMMON)
76+
. = ALIGN(32);
77+
__bss_end__ = .;
78+
} > RAM
79+
80+
81+
.noinit (NOLOAD):
82+
{
83+
*(.noinit*);
84+
. = ALIGN(32);
85+
} > RAM
86+
87+
88+
text_application_ram :
89+
{
90+
. = ALIGN(32);
91+
__vma_ramfuncs_start__ = .;
92+
__text_application_ram_start__ = .;
93+
94+
*(text_application_ram)
95+
96+
. = ALIGN(32);
97+
__vma_ramfuncs_end__ = .;
98+
__text_application_ram_end__ = .;
99+
} > RAM AT > FLASH
100+
101+
.rodata :
102+
{
103+
__lma_ramfuncs_end__ = .;
104+
__rodata_start__ = .;
105+
__rodata_end__ = .;
106+
} > FLASH
107+
108+
.text :
109+
{
110+
linker_code_begin = .;
111+
*(SORT_BY_ALIGNMENT(.text*))
112+
*(SORT_BY_ALIGNMENT(text_*))
113+
. = ALIGN(32);
114+
linker_code_end = .;
115+
116+
KEEP(*(.init))
117+
KEEP(*(.fini))
118+
119+
/* .ctors */
120+
*crtbegin.o(.ctors)
121+
*crtbegin?.o(.ctors)
122+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
123+
*(SORT(.ctors.*))
124+
*(.ctors)
125+
126+
/* .dtors */
127+
*crtbegin.o(.dtors)
128+
*crtbegin?.o(.dtors)
129+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
130+
*(SORT(.dtors.*))
131+
*(.dtors)
132+
133+
*(.rodata*)
134+
*(.eh_frame*)
135+
} > FLASH
136+
137+
.ARM.extab :
138+
{
139+
*(.ARM.extab* .gnu.linkonce.armextab.*)
140+
} > FLASH
141+
142+
__exidx_start = .;
143+
.ARM.exidx :
144+
{
145+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
146+
} > FLASH
147+
__exidx_end = .;
148+
149+
.copy.table :
150+
{
151+
. = ALIGN(4);
152+
__copy_table_start__ = .;
153+
154+
LONG (__etext)
155+
LONG (__data_start__)
156+
LONG ((__data_end__ - __data_start__) / 4)
157+
158+
/* Add each additional data section here */
159+
/*
160+
LONG (__etext2)
161+
LONG (__data2_start__)
162+
LONG ((__data2_end__ - __data2_start__) / 4)
163+
*/
164+
165+
__copy_table_end__ = .;
166+
} > FLASH
167+
168+
.zero.table :
169+
{
170+
. = ALIGN(4);
171+
__zero_table_start__ = .;
172+
/* Add each additional bss section here */
173+
/*
174+
LONG (__bss2_start__)
175+
LONG ((__bss2_end__ - __bss2_start__) / 4)
176+
*/
177+
178+
__zero_table_end__ = .;
179+
__etext = .;
180+
} > FLASH
181+
182+
.data :
183+
{
184+
. = ALIGN(4);
185+
__data_start__ = .;
186+
*(vtable)
187+
*(SORT_BY_ALIGNMENT(.data*))
188+
. = ALIGN(4);
189+
190+
. = ALIGN(4);
191+
/* preinit data */
192+
PROVIDE_HIDDEN (__preinit_array_start = .);
193+
KEEP(*(.preinit_array))
194+
PROVIDE_HIDDEN (__preinit_array_end = .);
195+
196+
. = ALIGN(4);
197+
/* init data */
198+
PROVIDE_HIDDEN (__init_array_start = .);
199+
KEEP(*(SORT(.init_array.*)))
200+
KEEP(*(.init_array))
201+
PROVIDE_HIDDEN (__init_array_end = .);
202+
203+
. = ALIGN(4);
204+
/* finit data */
205+
PROVIDE_HIDDEN (__fini_array_start = .);
206+
KEEP(*(SORT(.fini_array.*)))
207+
KEEP(*(.fini_array))
208+
PROVIDE_HIDDEN (__fini_array_end = .);
209+
210+
. = ALIGN(4);
211+
/* All data end */
212+
__data_end__ = .;
213+
214+
} > RAM AT > FLASH
215+
216+
217+
/* Calculate heap size based on RAM limits. */
218+
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
219+
heap_size = heap_limit - __HeapBase;
220+
.memory_manager_heap (NOLOAD):
221+
{
222+
. = ALIGN(8);
223+
__HeapBase = .;
224+
. += heap_size;
225+
__end__ = .;
226+
end = __end__;
227+
_end = __end__;
228+
KEEP(*(.memory_manager_heap*))
229+
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);
230+
} > RAM
231+
232+
__heap_size = __HeapLimit - __HeapBase;
233+
__ram_end__ = 0x20000004 + 0x7fffc;
234+
__main_flash_end__ = 0x8006000 + 0x318000;
235+
236+
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured
237+
* block sizes and then "place" them at the end of flash when the size is known. */
238+
.internal_storage (DSECT) : {
239+
KEEP(*(.internal_storage*))
240+
} > FLASH
241+
242+
243+
.nvm (DSECT) : {
244+
KEEP(*(.simee*))
245+
} > FLASH
246+
247+
__ramfuncs_start__ = __vma_ramfuncs_start__;
248+
__ramfuncs_end__ = __vma_ramfuncs_end__;
249+
250+
linker_nvm_end = __main_flash_end__;
251+
linker_nvm_begin = linker_nvm_end - SIZEOF(.nvm);
252+
linker_storage_end = linker_nvm_begin;
253+
__nvm3Base = linker_nvm_begin;
254+
255+
linker_storage_begin = linker_storage_end - SIZEOF(.internal_storage);
256+
ASSERT((linker_storage_begin >= (__etext + SIZEOF(.data))), "FLASH memory overflowed !")
257+
258+
259+
app_flash_end = 0x8006000 + 0x318000;
260+
ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= app_flash_end, "NVM3 is excessing the flash size !")
261+
}

examples/platform/silabs/provision/BUILD.gn

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ source_set("storage") {
4040
libs = [ "${sdk_support_root}/matter/provision/lib/libProvision_si917.a" ]
4141
}
4242
} else {
43+
if (silabs_family == "mgm26") {
44+
silabs_family = "efr32mg26"
45+
}
4346
if (use_provision_flash_storage) {
4447
libs = [ "${sdk_support_root}/matter/provision/lib/libProvisionFlash_${silabs_family}.a" ]
4548
} else {

scripts/build/build/targets.py

+3
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ def BuildEfr32Target():
258258
TargetPart('brd2605a', board=Efr32Board.BRD2605A, enable_wifi=True, enable_917_soc=True),
259259
TargetPart('brd4343a', board=Efr32Board.BRD4343A, enable_wifi=True, enable_917_soc=True),
260260
TargetPart('brd4342a', board=Efr32Board.BRD4342A, enable_wifi=True, enable_917_soc=True),
261+
TargetPart('brd4350a', board=Efr32Board.BRD4350A),
262+
TargetPart('brd4351a', board=Efr32Board.BRD4351A),
263+
TargetPart('brd2709a', board=Efr32Board.BRD2709A),
261264
])
262265

263266
# apps

scripts/build/builders/efr32.py

+9
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ class Efr32Board(Enum):
114114
BRD2605A = 13
115115
BRD4343A = 14
116116
BRD4342A = 15
117+
BRD4350A = 16
118+
BRD4351A = 17
119+
BRD2709A = 18
117120

118121
def GnArgName(self):
119122
if self == Efr32Board.BRD2704B:
@@ -146,6 +149,12 @@ def GnArgName(self):
146149
return 'BRD4343A'
147150
elif self == Efr32Board.BRD4342A:
148151
return 'BRD4342A'
152+
elif self == Efr32Board.BRD4350A:
153+
return 'BRD4350A'
154+
elif self == Efr32Board.BRD4351A:
155+
return 'BRD4351A'
156+
elif self == Efr32Board.BRD2709A:
157+
return 'BRD2709A'
149158
else:
150159
raise Exception('Unknown board #: %r' % self)
151160

scripts/build/testdata/all_targets_linux_x64.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bouffalolab-{bl602dk,bl616dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-ligh
55
cc32xx-{lock,air-purifier}
66
ti-cc13x4_26x4-{lighting,lock,pump,pump-controller}[-mtd][-ftd]
77
cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw930739m2evb_01,cyw930739m2evb_02}-{light,light-switch,lock,thermostat}
8-
efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a,brd4343a,brd4342a}-{window-covering,switch,unit-test,light,lock,thermostat,pump,air-quality-sensor-app}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation]
8+
efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a,brd4343a,brd4342a,brd4350a,brd4351a,brd2709a}-{window-covering,switch,unit-test,light,lock,thermostat,pump,air-quality-sensor-app}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation]
99
esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing]
1010
genio-lighting-app
1111
linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang]

0 commit comments

Comments
 (0)