Skip to content

Commit 75b6ce0

Browse files
committed
caracal support
1 parent f957643 commit 75b6ce0

File tree

12 files changed

+333
-8
lines changed

12 files changed

+333
-8
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]

scripts/flashing/silabs_firmware_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
""",
8080
},
8181
'device': {
82-
'help': 'Device family or platform to target (EFR32 or MGM240)',
82+
'help': 'Device family or platform to target (EFR32, MGM260 or MGM240)',
8383
'default': None,
8484
'alias': ['-d'],
8585
'argparse': {

third_party/silabs/BUILD.gn

+3
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ if (wifi_soc != true) { # CCP board
247247
if (silabs_family == "mgm24") {
248248
# Locally set silabs_family to efr32mg24 as mgm24 doesn't have dedicated libsl_ot_stack lib
249249
silabs_family = "efr32mg24"
250+
} else if (silabs_family == "mgm26") {
251+
# Locally set silabs_family to efr32mg26 as mgm26 doesn't have dedicated libsl_ot_stack lib
252+
silabs_family = "efr32mg26"
250253
}
251254

252255
libs = [ "${sl_ot_libs_path}/libs/libsl_ot_stack_${XTD}_${COAP_API}${silabs_family}_gcc.a" ]

third_party/silabs/efr32_sdk.gni

+27-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ silabs_common_plat_dir = "${chip_root}/examples/platform/silabs"
9999
silabs_platform_dir = "${chip_root}/src/platform/silabs"
100100

101101
is_series_2 = silabs_family == "mgm24" || silabs_family == "efr32mg24" ||
102-
silabs_family == "efr32mg26"
102+
silabs_family == "efr32mg26" || silabs_family == "mgm26"
103103

104104
assert(efr32_sdk_root != "", "efr32_sdk_root must be specified")
105105

@@ -336,6 +336,24 @@ template("efr32_sdk") {
336336
]
337337

338338
defines += [ "EFR32MG26" ]
339+
} else if (silabs_family == "mgm26") {
340+
_include_dirs += [
341+
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM26/Include",
342+
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg26",
343+
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg26/config",
344+
]
345+
346+
libs += [
347+
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/build/gcc/xg26/release/liblinklayer.a",
348+
"${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg26_gcc_release.a",
349+
]
350+
if (silabs_mcu == "MGM260PB22VNA") {
351+
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm260pb22vna_gcc.a" ]
352+
} else if (silabs_mcu == "MGM260PB32VNA") {
353+
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm260pb32vna_gcc.a" ]
354+
}
355+
356+
defines += [ "MGM26" ]
339357
}
340358

341359
if (use_wf200) {
@@ -1058,6 +1076,14 @@ template("efr32_sdk") {
10581076
"${efr32_sdk_root}/platform/service/device_manager/clocks/sl_device_clock_efr32xg26.c",
10591077
"${efr32_sdk_root}/platform/service/device_manager/devices/sl_device_peripheral_hal_efr32xg26.c",
10601078
]
1079+
} else if (silabs_family == "mgm26") {
1080+
sources += [
1081+
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM26/Source/startup_mgm26.c",
1082+
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM26/Source/system_mgm26.c",
1083+
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c",
1084+
"${efr32_sdk_root}/platform/service/device_manager/clocks/sl_device_clock_efr32xg26.c",
1085+
"${efr32_sdk_root}/platform/service/device_manager/devices/sl_device_peripheral_hal_efr32xg26.c",
1086+
]
10611087
}
10621088

10631089
if (is_series_2) {

third_party/silabs/matter_support

Submodule matter_support updated 231 files

third_party/silabs/silabs_arm.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (silabs_family == "SiWx917-common") {
2121
arm_float_abi = "softfp"
2222
arm_fpu = "fpv4-sp-d16"
2323
} else if (silabs_family == "efr32mg24" || silabs_family == "mgm24" ||
24-
silabs_family == "efr32mg26") {
24+
silabs_family == "efr32mg26" || silabs_family == "mgm26") {
2525
arm_arch = "armv8-m.main+dsp"
2626
arm_abi = "aapcs"
2727
arm_cpu = "cortex-m33"

0 commit comments

Comments
 (0)