Skip to content

Commit 64252c8

Browse files
[Silabs] Folder structure introduction for addition of SiWx917 (project-chip#23736)
* src/platform/silabs folder changes * examples/lighting-app and examples/platform folder modification for silabs/efr32 * Skeleton for the SiWx917 folder * CI fix for the lighting app due to modified folder structure * Revert "Skeleton for the SiWx917 folder" This reverts commit bbe322d. * Build changes for different applications * Restyle PR * Fixing the build failures * fixing the lock app * updating the dry run efr32 for the new folder structure] * Added a variable for the BUILD.gn file * restyle the last commit * src/platform/silabs folder changes * examples/lighting-app and examples/platform folder modification for silabs/efr32 * Skeleton for the SiWx917 folder * CI fix for the lighting app due to modified folder structure * Revert "Skeleton for the SiWx917 folder" This reverts commit bbe322d. * Build changes for different applications * Restyle PR * Fixing the build failures * fixing the lock app * updating the dry run efr32 for the new folder structure] * Added a variable for the BUILD.gn file * restyle the last commit
1 parent 7f1b4b8 commit 64252c8

File tree

167 files changed

+141
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+141
-129
lines changed

.github/workflows/examples-efr32.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
- name: Build example EFR32 Lighting App for BRD4161A with RPCs
102102
timeout-minutes: 15
103103
run: |
104-
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A "is_debug=false" \
104+
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_debug_rpc BRD4161A "is_debug=false" \
105105
disable_lcd=true 'import("//with_pw_rpc.gni")'
106106
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \
107107
out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
@@ -118,7 +118,7 @@ jobs:
118118
- name: Build example EFR32+RS911x WiFi Lighting app for BRD4161A
119119
timeout-minutes: 15
120120
run: |
121-
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x
121+
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x
122122
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs911x lighting-app \
123123
out/lighting_app_wifi_rs911x/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
124124
- name: Clean out build output

config/efr32/lib/pw_rpc/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static_library("pw_rpc") {
2424
public_deps = [
2525
"$dir_pw_rpc:server",
2626
"$dir_pw_rpc/nanopb:echo_service",
27-
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32",
27+
"${chip_root}/examples/platform/silabs/efr32/pw_sys_io:pw_sys_io_efr32",
2828
"${dir_pigweed}/pw_hdlc:pw_rpc",
2929
dir_pw_assert,
3030
dir_pw_checksum,

config/efr32/lib/pw_rpc/pw_rpc.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import("//build_overrides/pigweed.gni")
1818
pw_log_BACKEND = "$dir_pw_log_basic"
1919
pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
2020
pw_sys_io_BACKEND =
21-
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32"
21+
"${chip_root}/examples/platform/silabs/efr32/pw_sys_io:pw_sys_io_efr32"
2222

2323
pw_build_LINK_DEPS = [
2424
"$dir_pw_assert:impl",

examples/light-switch-app/efr32/BUILD.gn

+10-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ if (chip_enable_pw_rpc) {
3232
assert(current_os == "freertos")
3333

3434
efr32_project_dir = "${chip_root}/examples/light-switch-app/efr32"
35-
examples_plat_dir = "${chip_root}/examples/platform/efr32"
35+
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
36+
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"
3637

3738
declare_args() {
3839
# Dump memory usage at link time.
@@ -79,7 +80,7 @@ assert(!(use_wf200 && chip_enable_openthread))
7980
if (chip_enable_wifi) {
8081
assert(use_rs911x || use_wf200)
8182
enable_openthread_cli = false
82-
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
83+
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
8384
}
8485

8586
# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
@@ -91,7 +92,7 @@ if (silabs_board == "BRD4166A" || silabs_board == "BRD2601B" ||
9192

9293
# WiFi settings
9394
if (chip_enable_wifi) {
94-
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
95+
wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi"
9596
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
9697
if (lwip_ipv4) {
9798
efr32_lwip_defs += [
@@ -132,10 +133,11 @@ efr32_sdk("sdk") {
132133
]
133134

134135
include_dirs = [
135-
"${chip_root}/src/platform/EFR32",
136+
"${chip_root}/src/platform/silabs/EFR32",
136137
"${efr32_project_dir}/include",
137138
"${examples_plat_dir}",
138139
"${chip_root}/src/lib",
140+
"${examples_common_plat_dir}",
139141
]
140142

141143
defines = [
@@ -183,9 +185,9 @@ efr32_executable("light_switch_app") {
183185
defines = []
184186

185187
sources = [
188+
"${examples_common_plat_dir}/heap_4_silabs.c",
186189
"${examples_plat_dir}/BaseApplication.cpp",
187190
"${examples_plat_dir}/efr32_utils.cpp",
188-
"${examples_plat_dir}/heap_4_silabs.c",
189191
"${examples_plat_dir}/init_efrPlatform.cpp",
190192
"${examples_plat_dir}/matter_config.cpp",
191193
"src/AppTask.cpp",
@@ -302,8 +304,8 @@ efr32_executable("light_switch_app") {
302304
sources += [
303305
"${chip_root}/examples/common/pigweed/RpcService.cpp",
304306
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
305-
"${examples_plat_dir}/PigweedLogger.cpp",
306-
"${examples_plat_dir}/Rpc.cpp",
307+
"${examples_common_plat_dir}/PigweedLogger.cpp",
308+
"${examples_common_plat_dir}/Rpc.cpp",
307309
]
308310

309311
deps += [
@@ -327,7 +329,7 @@ efr32_executable("light_switch_app") {
327329
}
328330

329331
if (enable_heap_monitoring) {
330-
sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ]
332+
sources += [ "${examples_common_plat_dir}/MemMonitoring.cpp" ]
331333
defines += [ "HEAP_MONITORING" ]
332334
}
333335

examples/light-switch-app/efr32/args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import("//build_overrides/chip.gni")
1616
import("//build_overrides/pigweed.gni")
1717
import("${chip_root}/config/standalone/args.gni")
18-
import("${chip_root}/src/platform/EFR32/args.gni")
18+
import("${chip_root}/src/platform/silabs/EFR32/args.gni")
1919

2020
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
2121

examples/light-switch-app/efr32/build_for_wifi_args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import("${chip_root}/config/standalone/args.gni")
1717

1818
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
1919
chip_enable_openthread = false
20-
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
20+
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
2121

2222
chip_enable_ota_requestor = true
2323

examples/lighting-app/efr32/build_overrides

-1
This file was deleted.

examples/lighting-app/efr32/third_party/connectedhomeip

-1
This file was deleted.
File renamed without changes.

examples/lighting-app/efr32/BUILD.gn examples/lighting-app/silabs/efr32/BUILD.gn

+11-9
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ if (chip_enable_pw_rpc) {
3131

3232
assert(current_os == "freertos")
3333

34-
efr32_project_dir = "${chip_root}/examples/lighting-app/efr32"
35-
examples_plat_dir = "${chip_root}/examples/platform/efr32"
34+
efr32_project_dir = "${chip_root}/examples/lighting-app/silabs/efr32"
35+
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
36+
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"
3637

3738
declare_args() {
3839
# Dump memory usage at link time.
@@ -79,7 +80,7 @@ assert(!(use_wf200 && chip_enable_openthread))
7980
if (chip_enable_wifi) {
8081
assert(use_rs911x || use_wf200)
8182
enable_openthread_cli = false
82-
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
83+
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
8384
}
8485

8586
# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
@@ -96,7 +97,7 @@ if (chip_enable_wifi) {
9697
show_qr_code = false
9798
disable_lcd = true
9899
}
99-
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
100+
wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi"
100101
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
101102
if (lwip_ipv4) {
102103
efr32_lwip_defs += [
@@ -137,10 +138,11 @@ efr32_sdk("sdk") {
137138
]
138139

139140
include_dirs = [
140-
"${chip_root}/src/platform/EFR32",
141+
"${chip_root}/src/platform/silabs/EFR32",
141142
"${efr32_project_dir}/include",
142143
"${examples_plat_dir}",
143144
"${chip_root}/src/lib",
145+
"${examples_common_plat_dir}",
144146
]
145147

146148
defines = [
@@ -192,9 +194,9 @@ efr32_executable("lighting_app") {
192194
defines = []
193195

194196
sources = [
197+
"${examples_common_plat_dir}/heap_4_silabs.c",
195198
"${examples_plat_dir}/BaseApplication.cpp",
196199
"${examples_plat_dir}/efr32_utils.cpp",
197-
"${examples_plat_dir}/heap_4_silabs.c",
198200
"${examples_plat_dir}/init_efrPlatform.cpp",
199201
"${examples_plat_dir}/matter_config.cpp",
200202
"src/AppTask.cpp",
@@ -306,8 +308,8 @@ efr32_executable("lighting_app") {
306308
sources += [
307309
"${chip_root}/examples/common/pigweed/RpcService.cpp",
308310
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
309-
"${examples_plat_dir}/PigweedLogger.cpp",
310-
"${examples_plat_dir}/Rpc.cpp",
311+
"${examples_common_plat_dir}/PigweedLogger.cpp",
312+
"${examples_common_plat_dir}/Rpc.cpp",
311313
]
312314

313315
deps += [
@@ -336,7 +338,7 @@ efr32_executable("lighting_app") {
336338
}
337339

338340
if (enable_heap_monitoring) {
339-
sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ]
341+
sources += [ "${examples_common_plat_dir}/MemMonitoring.cpp" ]
340342
defines += [ "HEAP_MONITORING" ]
341343
}
342344

examples/lighting-app/efr32/args.gni examples/lighting-app/silabs/efr32/args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import("//build_overrides/chip.gni")
1616
import("//build_overrides/pigweed.gni")
1717
import("${chip_root}/config/standalone/args.gni")
18-
import("${chip_root}/src/platform/EFR32/args.gni")
18+
import("${chip_root}/src/platform/silabs/EFR32/args.gni")
1919

2020
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
2121

examples/lighting-app/efr32/build_for_wifi_args.gni examples/lighting-app/silabs/efr32/build_for_wifi_args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import("${chip_root}/config/standalone/args.gni")
1717

1818
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
1919
chip_enable_openthread = false
20-
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
20+
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
2121

2222
chip_enable_ota_requestor = true
2323

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../build_overrides
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../..

examples/lighting-app/efr32/with_pw_rpc.gni examples/lighting-app/silabs/efr32/with_pw_rpc.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import("//build_overrides/chip.gni")
1919
import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni")
20-
import("${chip_root}/examples/platform/efr32/args.gni")
20+
import("${chip_root}/examples/platform/silabs/efr32/args.gni")
2121

2222
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
2323

examples/lock-app/efr32/BUILD.gn

+10-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ if (chip_enable_pw_rpc) {
3232
assert(current_os == "freertos")
3333

3434
efr32_project_dir = "${chip_root}/examples/lock-app/efr32"
35-
examples_plat_dir = "${chip_root}/examples/platform/efr32"
35+
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
36+
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"
3637

3738
declare_args() {
3839
# Dump memory usage at link time.
@@ -79,7 +80,7 @@ assert(!(use_wf200 && chip_enable_openthread))
7980
if (chip_enable_wifi) {
8081
assert(use_rs911x || use_wf200)
8182
enable_openthread_cli = false
82-
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
83+
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
8384
}
8485

8586
# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
@@ -91,7 +92,7 @@ if (silabs_board == "BRD4166A" || silabs_board == "BRD2601B" ||
9192

9293
# WiFi settings
9394
if (chip_enable_wifi) {
94-
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
95+
wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi"
9596
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
9697
if (lwip_ipv4) {
9798
efr32_lwip_defs += [
@@ -132,10 +133,11 @@ efr32_sdk("sdk") {
132133
]
133134

134135
include_dirs = [
135-
"${chip_root}/src/platform/EFR32",
136+
"${chip_root}/src/platform/silabs/EFR32",
136137
"${efr32_project_dir}/include",
137138
"${examples_plat_dir}",
138139
"${chip_root}/src/lib",
140+
"${examples_common_plat_dir}",
139141
]
140142

141143
defines = [
@@ -182,9 +184,9 @@ efr32_executable("lock_app") {
182184
defines = []
183185

184186
sources = [
187+
"${examples_common_plat_dir}/heap_4_silabs.c",
185188
"${examples_plat_dir}/BaseApplication.cpp",
186189
"${examples_plat_dir}/efr32_utils.cpp",
187-
"${examples_plat_dir}/heap_4_silabs.c",
188190
"${examples_plat_dir}/init_efrPlatform.cpp",
189191
"${examples_plat_dir}/matter_config.cpp",
190192
"src/AppTask.cpp",
@@ -300,8 +302,8 @@ efr32_executable("lock_app") {
300302
sources += [
301303
"${chip_root}/examples/common/pigweed/RpcService.cpp",
302304
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
303-
"${examples_plat_dir}/PigweedLogger.cpp",
304-
"${examples_plat_dir}/Rpc.cpp",
305+
"${examples_common_plat_dir}/PigweedLogger.cpp",
306+
"${examples_common_plat_dir}/Rpc.cpp",
305307
]
306308

307309
deps += [
@@ -327,7 +329,7 @@ efr32_executable("lock_app") {
327329
}
328330

329331
if (enable_heap_monitoring) {
330-
sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ]
332+
sources += [ "${examples_common_plat_dir}/MemMonitoring.cpp" ]
331333
defines += [ "HEAP_MONITORING" ]
332334
}
333335

examples/lock-app/efr32/args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import("//build_overrides/chip.gni")
1616
import("//build_overrides/pigweed.gni")
1717
import("${chip_root}/config/standalone/args.gni")
18-
import("${chip_root}/src/platform/EFR32/args.gni")
18+
import("${chip_root}/src/platform/silabs/EFR32/args.gni")
1919

2020
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
2121

examples/lock-app/efr32/build_for_wifi_args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import("${chip_root}/config/standalone/args.gni")
1717

1818
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
1919
chip_enable_openthread = false
20-
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
20+
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
2121

2222
chip_enable_ota_requestor = true
2323

examples/lock-app/efr32/with_pw_rpc.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import("//build_overrides/chip.gni")
1919
import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni")
20-
import("${chip_root}/examples/platform/efr32/args.gni")
20+
import("${chip_root}/examples/platform/silabs/efr32/args.gni")
2121

2222
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
2323

examples/persistent-storage/efr32/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "init_efrPlatform.h"
3333
#include "sl_system_kernel.h"
3434
#include <platform/CHIPDeviceLayer.h>
35-
#include <platform/EFR32/EFR32Config.h>
3635
#include <platform/KeyValueStoreManager.h>
36+
#include <platform/silabs/EFR32Config.h>
3737

3838
static TaskHandle_t sTestTaskHandle;
3939
void TestTask(void * pvParameter)
File renamed without changes.
File renamed without changes.

examples/platform/efr32/BUILD.gn examples/platform/silabs/efr32/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ config("attestation-credentials-config") {
8282

8383
source_set("efr32-attestation-credentials") {
8484
sources = [
85-
"EFR32DeviceAttestationCreds.cpp",
86-
"EFR32DeviceAttestationCreds.h",
85+
"../EFR32DeviceAttestationCreds.cpp",
86+
"../EFR32DeviceAttestationCreds.h",
8787
]
8888

8989
public_deps = [

examples/platform/efr32/BaseApplication.cpp examples/platform/silabs/efr32/BaseApplication.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151
#include <setup_payload/SetupPayload.h>
5252

5353
#if CHIP_ENABLE_OPENTHREAD
54-
#include <platform/EFR32/ThreadStackManagerImpl.h>
5554
#include <platform/OpenThread/OpenThreadUtils.h>
5655
#include <platform/ThreadStackManager.h>
56+
#include <platform/silabs/ThreadStackManagerImpl.h>
5757
#endif // CHIP_ENABLE_OPENTHREAD
5858

5959
#ifdef SL_WIFI
6060
#include "wfx_host_events.h"
6161
#include <app/clusters/network-commissioning/network-commissioning.h>
62-
#include <platform/EFR32/NetworkCommissioningWiFiDriver.h>
62+
#include <platform/silabs/NetworkCommissioningWiFiDriver.h>
6363
#endif // SL_WIFI
6464

6565
/**********************************************************

examples/platform/efr32/EFR32DeviceDataProvider.cpp examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717

1818
#include "EFR32DeviceDataProvider.h"
19-
#include "EFR32Config.h"
2019
#include <crypto/CHIPCryptoPAL.h>
2120
#include <lib/support/Base64.h>
21+
#include <platform/silabs/EFR32Config.h>
2222
#include <setup_payload/Base38Encode.h>
2323
#include <setup_payload/SetupPayload.h>
2424

File renamed without changes.

examples/platform/efr32/OTAConfig.h examples/platform/silabs/efr32/OTAConfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
2323
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
2424
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
25-
#include <platform/EFR32/OTAImageProcessorImpl.h>
25+
#include <platform/silabs/EFR32/OTAImageProcessorImpl.h>
2626

2727
class OTAConfig
2828
{
File renamed without changes.

0 commit comments

Comments
 (0)