Skip to content

Commit 4a47e59

Browse files
[Silabs] Added new wifi BRD2605A board support in matter (#35225)
* Added new wifi BRD2605A board support in matter * Moved si91x support files to common place for brd4338a and brd2605a boards * Updating matter_support pointer * Updated matter_support pointer to latest main * Added the default setting chip_device_platform to SiWx917 into build_for_wifi_gnfile.gn * added brd2605a in efr32.py and targets.py
1 parent 396f7f5 commit 4a47e59

File tree

14 files changed

+56
-21
lines changed

14 files changed

+56
-21
lines changed

.github/workflows/examples-efr32.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,24 @@ jobs:
128128
/tmp/bloat_reports/
129129
- name: Clean out build output
130130
run: rm -rf ./out
131+
- name: Build BRD2605A WiFi Soc variants
132+
run: |
133+
./scripts/run_in_build_env.sh \
134+
"./scripts/build/build_examples.py \
135+
--enable-flashbundle \
136+
--target efr32-brd2605a-light-skip-rps-generation \
137+
--target efr32-brd2605a-lock-skip-rps-generation \
138+
build \
139+
--copy-artifacts-to out/artifacts \
140+
"
141+
- name: Prepare bloat report for brd2605a lock app
142+
run: |
143+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
144+
efr32 BRD2605a lock-app \
145+
out/efr32-brd2605a-lock-skip-rps-generation/matter-silabs-lock-example.out \
146+
/tmp/bloat_reports/
147+
- name: Clean out build output
148+
run: rm -rf ./out
131149
- name: Build EFR32 with WiFi NCP
132150
run: |
133151
./scripts/run_in_build_env.sh \

examples/light-switch-app/silabs/build_for_wifi_gnfile.gn

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ default_args = {
2424
target_cpu = "arm"
2525
target_os = "freertos"
2626
chip_enable_wifi = true
27+
chip_device_platform = "SiWx917"
2728
import("//build_for_wifi_args.gni")
2829
}

examples/lighting-app/silabs/build_for_wifi_gnfile.gn

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ default_args = {
2424
target_cpu = "arm"
2525
target_os = "freertos"
2626
chip_enable_wifi = true
27+
chip_device_platform = "SiWx917"
2728
import("//build_for_wifi_args.gni")
2829
}

examples/lock-app/silabs/build_for_wifi_gnfile.gn

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ default_args = {
2424
target_cpu = "arm"
2525
target_os = "freertos"
2626
chip_enable_wifi = true
27+
chip_device_platform = "SiWx917"
2728
import("//build_for_wifi_args.gni")
2829
}

examples/thermostat/silabs/build_for_wifi_gnfile.gn

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ default_args = {
2424
target_cpu = "arm"
2525
target_os = "freertos"
2626
chip_enable_wifi = true
27+
chip_device_platform = "SiWx917"
2728
import("//build_for_wifi_args.gni")
2829
}

examples/window-app/silabs/build_for_wifi_gnfile.gn

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ default_args = {
2424
target_cpu = "arm"
2525
target_os = "freertos"
2626
chip_enable_wifi = true
27+
chip_device_platform = "SiWx917"
2728
import("//build_for_wifi_args.gni")
2829
}

scripts/build/build/targets.py

+1
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ def BuildEfr32Target():
253253
TargetPart('brd4186c', board=Efr32Board.BRD4186C),
254254
TargetPart('brd2703a', board=Efr32Board.BRD2703A),
255255
TargetPart('brd4338a', board=Efr32Board.BRD4338A, enable_wifi=True, enable_917_soc=True),
256+
TargetPart('brd2605a', board=Efr32Board.BRD2605A, enable_wifi=True, enable_917_soc=True),
256257
])
257258

258259
# apps

scripts/build/builders/efr32.py

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class Efr32Board(Enum):
104104
BRD4186C = 10
105105
BRD4338A = 11
106106
BRD2703A = 12
107+
BRD2605A = 13
107108

108109
def GnArgName(self):
109110
if self == Efr32Board.BRD2704B:
@@ -130,6 +131,8 @@ def GnArgName(self):
130131
return 'BRD4338A'
131132
elif self == Efr32Board.BRD2703A:
132133
return 'BRD2703A'
134+
elif self == Efr32Board.BRD2605A:
135+
return 'BRD2605A'
133136
else:
134137
raise Exception('Unknown board #: %r' % self)
135138

scripts/build/testdata/all_targets_linux_x64.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bouffalolab-{bl602dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-light,bl602-
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}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-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}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-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/examples/gn_silabs_example.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,9 @@ else
297297
fi
298298

299299
# 917 exception. TODO find a more generic way
300-
if [ "$SILABS_BOARD" == "BRD4338A" ]; then
300+
if [ "$SILABS_BOARD" == "BRD4338A" ] || [ "$SILABS_BOARD" == "BRD2605A" ]; then
301301
echo "Compiling for 917 WiFi SOC"
302302
USE_WIFI=true
303-
optArgs+="chip_device_platform =\"SiWx917\" is_debug=false "
304303
fi
305304

306305
if [ "$USE_GIT_SHA_FOR_VERSION" == true ]; then

src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp

+14-5
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323

2424
#include <app/icd/server/ICDServerConfig.h>
2525

26+
#include <lib/support/CodeUtils.h>
2627
#if SILABS_LOG_ENABLED
2728
#include "silabs_utils.h"
29+
2830
#endif // SILABS_LOG_ENABLED
2931

3032
// TODO add includes ?
@@ -49,6 +51,14 @@ void soc_pll_config(void);
4951
#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL
5052
#include "uart.h"
5153
#endif
54+
// TODO Remove this when SI91X-16606 is addressed
55+
#ifdef SI917_DEVKIT
56+
#define SL_LED_COUNT 1
57+
uint8_t ledPinArray[SL_LED_COUNT] = { SL_LED_LEDB_PIN };
58+
#else
59+
#define SL_LED_COUNT SL_SI91x_LED_COUNT
60+
uint8_t ledPinArray[SL_LED_COUNT] = { SL_LED_LED0_PIN, SL_LED_LED1_PIN };
61+
#endif
5262

5363
namespace chip {
5464
namespace DeviceLayer {
@@ -100,9 +110,8 @@ void SilabsPlatform::InitLed(void)
100110

101111
CHIP_ERROR SilabsPlatform::SetLed(bool state, uint8_t led)
102112
{
103-
// TODO add range check
104-
(state) ? sl_si91x_led_set(led ? SL_LED_LED1_PIN : SL_LED_LED0_PIN)
105-
: sl_si91x_led_clear(led ? SL_LED_LED1_PIN : SL_LED_LED0_PIN);
113+
VerifyOrReturnError(led < SL_LED_COUNT, CHIP_ERROR_INVALID_ARGUMENT);
114+
(state) ? sl_si91x_led_set(ledPinArray[led]) : sl_si91x_led_clear(ledPinArray[led]);
106115
return CHIP_NO_ERROR;
107116
}
108117

@@ -114,8 +123,8 @@ bool SilabsPlatform::GetLedState(uint8_t led)
114123

115124
CHIP_ERROR SilabsPlatform::ToggleLed(uint8_t led)
116125
{
117-
// TODO add range check
118-
sl_si91x_led_toggle(led ? SL_LED_LED1_PIN : SL_LED_LED0_PIN);
126+
VerifyOrReturnError(led < SL_LED_COUNT, CHIP_ERROR_INVALID_ARGUMENT);
127+
sl_si91x_led_toggle(ledPinArray[led]);
119128
return CHIP_NO_ERROR;
120129
}
121130
#endif // ENABLE_WSTK_LEDS

third_party/silabs/SiWx917_sdk.gni

+11-11
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ template("siwx917_sdk") {
6060
"${efr32_sdk_root}/platform/emdrv/nvm3/inc",
6161
"${efr32_sdk_root}/platform/emdrv/common/inc",
6262
"${efr32_sdk_root}/platform/service/device_init/inc",
63-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen",
64-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/config",
63+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen",
64+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/config",
6565

6666
"${chip_root}/src/platform/silabs/rs911x",
6767

@@ -131,7 +131,7 @@ template("siwx917_sdk") {
131131
"${efr32_sdk_root}/platform/service/sleeptimer/inc",
132132
"${efr32_sdk_root}/platform/service/sleeptimer/config",
133133
"${efr32_sdk_root}/platform/service/sleeptimer/src",
134-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/support/inc",
134+
"${sdk_support_root}/matter/si91x/support/inc",
135135

136136
"${efr32_sdk_root}/platform/service/iostream/inc",
137137
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/inc",
@@ -684,11 +684,11 @@ template("siwx917_sdk") {
684684
"${efr32_sdk_root}/util/third_party/freertos/kernel/stream_buffer.c",
685685
"${efr32_sdk_root}/util/third_party/freertos/kernel/tasks.c",
686686
"${efr32_sdk_root}/util/third_party/freertos/kernel/timers.c",
687-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_event_handler.c",
688-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_button_instances.c",
689-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c",
690-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_ulp_timer_init.c",
691-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/support/hal/rsi_hal_mcu_m4.c",
687+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_event_handler.c",
688+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_button_instances.c",
689+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_led_instances.c",
690+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_ulp_timer_init.c",
691+
"${sdk_support_root}/matter/si91x/support/hal/rsi_hal_mcu_m4.c",
692692
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/src/sl_si91x_button.c",
693693
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/src/sl_si91x_led.c",
694694
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/nvm3/src/sl_si91x_nvm3_hal_flash.c",
@@ -706,7 +706,7 @@ template("siwx917_sdk") {
706706
# STARTUP FILES
707707
"${efr32_sdk_root}/platform/service/iostream/src/sl_iostream.c",
708708
"${efr32_sdk_root}/platform/service/iostream/src/sl_iostream_rtt.c",
709-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/support/src/startup_common_RS1xxxx.c",
709+
"${sdk_support_root}/matter/si91x/support/src/startup_common_RS1xxxx.c",
710710
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/nvm3/src/sl_si91x_common_flash_intf.c",
711711

712712
# OTA
@@ -758,8 +758,8 @@ template("siwx917_sdk") {
758758

759759
if (chip_enable_icd_server) {
760760
sources += [
761-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_handler.c",
762-
"${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.c",
761+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_power_manager_handler.c",
762+
"${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_power_manager_wakeup_handler.c",
763763
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c",
764764
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/power_manager/src/sl_si91x_power_manager.c",
765765
"${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/power_manager/src/sli_si91x_power_manager.c",

third_party/silabs/matter_support

Submodule matter_support updated 56 files

third_party/silabs/silabs_board.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if (silabs_board == "") {
6262
assert(silabs_board != "", "silabs_board must be specified")
6363

6464
# Si917 WIFI board ----------
65-
if (silabs_board == "BRD4338A") {
65+
if (silabs_board == "BRD4338A" || silabs_board == "BRD2605A") {
6666
silabs_family = "SiWx917-common"
6767
silabs_mcu = "SiWG917M111MGTBA"
6868
wifi_soc = true

0 commit comments

Comments
 (0)