Skip to content

Commit

Permalink
[Silabs] Folder structure introduction for addition of SiWx917 (#23736)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
chirag-silabs authored and pull[bot] committed Feb 8, 2024
1 parent 941796c commit 2520433
Show file tree
Hide file tree
Showing 167 changed files with 141 additions and 129 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Build example EFR32 Lighting App for BRD4161A with RPCs
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A "is_debug=false" \
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_debug_rpc BRD4161A "is_debug=false" \
disable_lcd=true 'import("//with_pw_rpc.gni")'
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \
out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
Expand All @@ -118,7 +118,7 @@ jobs:
- name: Build example EFR32+RS911x WiFi Lighting app for BRD4161A
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs911x lighting-app \
out/lighting_app_wifi_rs911x/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
- name: Clean out build output
Expand Down
2 changes: 1 addition & 1 deletion config/efr32/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static_library("pw_rpc") {
public_deps = [
"$dir_pw_rpc:server",
"$dir_pw_rpc/nanopb:echo_service",
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32",
"${chip_root}/examples/platform/silabs/efr32/pw_sys_io:pw_sys_io_efr32",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_checksum,
Expand Down
2 changes: 1 addition & 1 deletion config/efr32/lib/pw_rpc/pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import("//build_overrides/pigweed.gni")
pw_log_BACKEND = "$dir_pw_log_basic"
pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND =
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32"
"${chip_root}/examples/platform/silabs/efr32/pw_sys_io:pw_sys_io_efr32"

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
18 changes: 10 additions & 8 deletions examples/light-switch-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ if (chip_enable_pw_rpc) {
assert(current_os == "freertos")

efr32_project_dir = "${chip_root}/examples/light-switch-app/efr32"
examples_plat_dir = "${chip_root}/examples/platform/efr32"
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"

declare_args() {
# Dump memory usage at link time.
Expand Down Expand Up @@ -79,7 +80,7 @@ assert(!(use_wf200 && chip_enable_openthread))
if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
enable_openthread_cli = false
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
}

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

# WiFi settings
if (chip_enable_wifi) {
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi"
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
if (lwip_ipv4) {
efr32_lwip_defs += [
Expand Down Expand Up @@ -132,10 +133,11 @@ efr32_sdk("sdk") {
]

include_dirs = [
"${chip_root}/src/platform/EFR32",
"${chip_root}/src/platform/silabs/EFR32",
"${efr32_project_dir}/include",
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
]

defines = [
Expand Down Expand Up @@ -183,9 +185,9 @@ efr32_executable("light_switch_app") {
defines = []

sources = [
"${examples_common_plat_dir}/heap_4_silabs.c",
"${examples_plat_dir}/BaseApplication.cpp",
"${examples_plat_dir}/efr32_utils.cpp",
"${examples_plat_dir}/heap_4_silabs.c",
"${examples_plat_dir}/init_efrPlatform.cpp",
"${examples_plat_dir}/matter_config.cpp",
"src/AppTask.cpp",
Expand Down Expand Up @@ -302,8 +304,8 @@ efr32_executable("light_switch_app") {
sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_plat_dir}/PigweedLogger.cpp",
"${examples_plat_dir}/Rpc.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
]

deps += [
Expand All @@ -327,7 +329,7 @@ efr32_executable("light_switch_app") {
}

if (enable_heap_monitoring) {
sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ]
sources += [ "${examples_common_plat_dir}/MemMonitoring.cpp" ]
defines += [ "HEAP_MONITORING" ]
}

Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/efr32/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/src/platform/EFR32/args.gni")
import("${chip_root}/src/platform/silabs/EFR32/args.gni")

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

Expand Down
2 changes: 1 addition & 1 deletion examples/light-switch-app/efr32/build_for_wifi_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import("${chip_root}/config/standalone/args.gni")

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

chip_enable_ota_requestor = true

Expand Down
1 change: 0 additions & 1 deletion examples/lighting-app/efr32/build_overrides

This file was deleted.

1 change: 0 additions & 1 deletion examples/lighting-app/efr32/third_party/connectedhomeip

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ if (chip_enable_pw_rpc) {

assert(current_os == "freertos")

efr32_project_dir = "${chip_root}/examples/lighting-app/efr32"
examples_plat_dir = "${chip_root}/examples/platform/efr32"
efr32_project_dir = "${chip_root}/examples/lighting-app/silabs/efr32"
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"

declare_args() {
# Dump memory usage at link time.
Expand Down Expand Up @@ -79,7 +80,7 @@ assert(!(use_wf200 && chip_enable_openthread))
if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
enable_openthread_cli = false
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
}

# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
Expand All @@ -96,7 +97,7 @@ if (chip_enable_wifi) {
show_qr_code = false
disable_lcd = true
}
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi"
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
if (lwip_ipv4) {
efr32_lwip_defs += [
Expand Down Expand Up @@ -137,10 +138,11 @@ efr32_sdk("sdk") {
]

include_dirs = [
"${chip_root}/src/platform/EFR32",
"${chip_root}/src/platform/silabs/EFR32",
"${efr32_project_dir}/include",
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
]

defines = [
Expand Down Expand Up @@ -192,9 +194,9 @@ efr32_executable("lighting_app") {
defines = []

sources = [
"${examples_common_plat_dir}/heap_4_silabs.c",
"${examples_plat_dir}/BaseApplication.cpp",
"${examples_plat_dir}/efr32_utils.cpp",
"${examples_plat_dir}/heap_4_silabs.c",
"${examples_plat_dir}/init_efrPlatform.cpp",
"${examples_plat_dir}/matter_config.cpp",
"src/AppTask.cpp",
Expand Down Expand Up @@ -306,8 +308,8 @@ efr32_executable("lighting_app") {
sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_plat_dir}/PigweedLogger.cpp",
"${examples_plat_dir}/Rpc.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
]

deps += [
Expand Down Expand Up @@ -336,7 +338,7 @@ efr32_executable("lighting_app") {
}

if (enable_heap_monitoring) {
sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ]
sources += [ "${examples_common_plat_dir}/MemMonitoring.cpp" ]
defines += [ "HEAP_MONITORING" ]
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/src/platform/EFR32/args.gni")
import("${chip_root}/src/platform/silabs/EFR32/args.gni")

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import("${chip_root}/config/standalone/args.gni")

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

chip_enable_ota_requestor = true

Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/silabs/efr32/build_overrides
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import("//build_overrides/chip.gni")
import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni")
import("${chip_root}/examples/platform/efr32/args.gni")
import("${chip_root}/examples/platform/silabs/efr32/args.gni")

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

Expand Down
18 changes: 10 additions & 8 deletions examples/lock-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ if (chip_enable_pw_rpc) {
assert(current_os == "freertos")

efr32_project_dir = "${chip_root}/examples/lock-app/efr32"
examples_plat_dir = "${chip_root}/examples/platform/efr32"
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"

declare_args() {
# Dump memory usage at link time.
Expand Down Expand Up @@ -79,7 +80,7 @@ assert(!(use_wf200 && chip_enable_openthread))
if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
enable_openthread_cli = false
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
import("${chip_root}/src/platform/silabs/EFR32/wifi_args.gni")
}

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

# WiFi settings
if (chip_enable_wifi) {
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/EFR32/wifi"
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
if (lwip_ipv4) {
efr32_lwip_defs += [
Expand Down Expand Up @@ -132,10 +133,11 @@ efr32_sdk("sdk") {
]

include_dirs = [
"${chip_root}/src/platform/EFR32",
"${chip_root}/src/platform/silabs/EFR32",
"${efr32_project_dir}/include",
"${examples_plat_dir}",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
]

defines = [
Expand Down Expand Up @@ -182,9 +184,9 @@ efr32_executable("lock_app") {
defines = []

sources = [
"${examples_common_plat_dir}/heap_4_silabs.c",
"${examples_plat_dir}/BaseApplication.cpp",
"${examples_plat_dir}/efr32_utils.cpp",
"${examples_plat_dir}/heap_4_silabs.c",
"${examples_plat_dir}/init_efrPlatform.cpp",
"${examples_plat_dir}/matter_config.cpp",
"src/AppTask.cpp",
Expand Down Expand Up @@ -300,8 +302,8 @@ efr32_executable("lock_app") {
sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_plat_dir}/PigweedLogger.cpp",
"${examples_plat_dir}/Rpc.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
]

deps += [
Expand All @@ -327,7 +329,7 @@ efr32_executable("lock_app") {
}

if (enable_heap_monitoring) {
sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ]
sources += [ "${examples_common_plat_dir}/MemMonitoring.cpp" ]
defines += [ "HEAP_MONITORING" ]
}

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/efr32/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/src/platform/EFR32/args.gni")
import("${chip_root}/src/platform/silabs/EFR32/args.gni")

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

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/efr32/build_for_wifi_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import("${chip_root}/config/standalone/args.gni")

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

chip_enable_ota_requestor = true

Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/efr32/with_pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import("//build_overrides/chip.gni")
import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni")
import("${chip_root}/examples/platform/efr32/args.gni")
import("${chip_root}/examples/platform/silabs/efr32/args.gni")

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

Expand Down
2 changes: 1 addition & 1 deletion examples/persistent-storage/efr32/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include "init_efrPlatform.h"
#include "sl_system_kernel.h"
#include <platform/CHIPDeviceLayer.h>
#include <platform/EFR32/EFR32Config.h>
#include <platform/KeyValueStoreManager.h>
#include <platform/silabs/EFR32Config.h>

static TaskHandle_t sTestTaskHandle;
void TestTask(void * pvParameter)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ config("attestation-credentials-config") {

source_set("efr32-attestation-credentials") {
sources = [
"EFR32DeviceAttestationCreds.cpp",
"EFR32DeviceAttestationCreds.h",
"../EFR32DeviceAttestationCreds.cpp",
"../EFR32DeviceAttestationCreds.h",
]

public_deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
#include <setup_payload/SetupPayload.h>

#if CHIP_ENABLE_OPENTHREAD
#include <platform/EFR32/ThreadStackManagerImpl.h>
#include <platform/OpenThread/OpenThreadUtils.h>
#include <platform/ThreadStackManager.h>
#include <platform/silabs/ThreadStackManagerImpl.h>
#endif // CHIP_ENABLE_OPENTHREAD

#ifdef SL_WIFI
#include "wfx_host_events.h"
#include <app/clusters/network-commissioning/network-commissioning.h>
#include <platform/EFR32/NetworkCommissioningWiFiDriver.h>
#include <platform/silabs/NetworkCommissioningWiFiDriver.h>
#endif // SL_WIFI

/**********************************************************
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*/

#include "EFR32DeviceDataProvider.h"
#include "EFR32Config.h"
#include <crypto/CHIPCryptoPAL.h>
#include <lib/support/Base64.h>
#include <platform/silabs/EFR32Config.h>
#include <setup_payload/Base38Encode.h>
#include <setup_payload/SetupPayload.h>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorDriver.h>
#include <app/clusters/ota-requestor/DefaultOTARequestorStorage.h>
#include <platform/EFR32/OTAImageProcessorImpl.h>
#include <platform/silabs/EFR32/OTAImageProcessorImpl.h>

class OTAConfig
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 2520433

Please sign in to comment.