Skip to content

Commit

Permalink
[Silabs] Rename examples folder (#26766)
Browse files Browse the repository at this point in the history
* rename build scripts

* Rename Lighting-silabs

* Rename light-switch-app

* Rename Lock-app

* rename thermostat

* rename silabs chef

* Fix build CI

* fix doc

* fix doc

* regen matter

* fix ci

---------

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jul 22, 2023
1 parent 28d174b commit 1078656
Show file tree
Hide file tree
Showing 139 changed files with 84 additions and 143 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Test SLC gen
timeout-minutes: 30
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32 ./out/light-app BRD4187C --slc_generate --docker
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker
rm -rf ./out/
- name: Build some BRD4187C variants
timeout-minutes: 90
Expand Down Expand Up @@ -120,15 +120,15 @@ jobs:
- name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lock-app/silabs/efr32/ out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200 --docker
scripts/examples/gn_silabs_example.sh examples/lock-app/silabs out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200 --docker
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \
out/lock_app_wifi_wf200/BRD4161A/matter-silabs-lock-example.out /tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build example EFR32+RS9116 WiFi Lighting app for BRD4161A
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116 --docker
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116 --docker
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs9116 lighting-app \
out/lighting_app_wifi_rs9116/BRD4161A/matter-silabs-lighting-example.out /tmp/bloat_reports/
- name: Clean out build output
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
.environment/pigweed-venv/*.log
- name: Build example EFR32 Lock App
run: scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/
run: scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/
out/lock_app_debug $SILABS_BOARD

- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Example:
##### Guides

- [Bouffalo Lab](/examples/lighting-app/bouffalolab/README.md)
- [EFR32 Window Covering](/examples/window-app/silabs/efr32/README.md)
- [EFR32 Window Covering](/examples/window-app/silabs/README.md)
- [ESP32 All Clusters](/examples/all-clusters-app/esp32/README.md)
- [ESP32 Lighting](/examples/lighting-app/esp32/README.md)
- [ESP32 Temperature Sensor](/examples/temperature-measurement-app/esp32/README.md)
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def main() -> int:
shell.run_cmd(f"rm -rf out/{options.sample_device_type_name}")
efr32_cmd_args = []
efr32_cmd_args.append(
f'{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh')
f'{_REPO_BASE_PATH}/scripts/examples/gn_silabs_example.sh')
efr32_cmd_args.append('./')
efr32_cmd_args.append(f'out/{options.sample_device_type_name}')
efr32_cmd_args.append(f'{silabs_board}')
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.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if (chip_enable_pw_rpc) {

assert(current_os == "freertos")

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

if (wifi_soc) {
Expand Down Expand Up @@ -80,7 +80,6 @@ if (wifi_soc) {
]

include_dirs = [
"${chip_root}/examples/light-switch-app/silabs/common",
"${chip_root}/src/platform/silabs/efr32",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
Expand Down Expand Up @@ -114,17 +113,14 @@ if (wifi_soc) {

silabs_executable("light_switch_app") {
output_name = "matter-silabs-light-switch-example.out"
include_dirs = [
"include",
"${chip_root}/examples/light-switch-app/silabs/common/",
]
include_dirs = [ "include" ]
defines = []

sources = [
"${chip_root}/examples/light-switch-app/silabs/common/BindingHandler.cpp",
"${chip_root}/examples/light-switch-app/silabs/common/LightSwitchMgr.cpp",
"${examples_common_plat_dir}/main.cpp",
"src/AppTask.cpp",
"src/BindingHandler.cpp",
"src/LightSwitchMgr.cpp",
"src/ZclCallbacks.cpp",
]

Expand All @@ -140,9 +136,7 @@ silabs_executable("light_switch_app") {
}

if (chip_build_libshell) {
sources += [
"${chip_root}/examples/light-switch-app/silabs/common/ShellCommands.cpp",
]
sources += [ "src/ShellCommands.cpp" ]
}

if (chip_enable_pw_rpc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Silicon Labs platform.
* Build the example application:

cd ~/connectedhomeip
./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app BRD4187C
./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app BRD4187C

- To delete generated executable, libraries and object files use:

Expand All @@ -129,19 +129,19 @@ Silicon Labs platform.

* Build the example with Matter shell

./scripts/examples/gn_efr32_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4187C chip_build_libshell=true
./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4187C chip_build_libshell=true

* Build the example as Sleepy End Device (SED)

$ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_SED BRD4187C --sed
$ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_SED BRD4187C --sed

or use gn as previously mentioned but adding the following arguments:

$ gn gen out/debug '--args=SILABS_BOARD="BRD4187C" enable_sleepy_device=true chip_openthread_ftd=false chip_build_libshell=true'

* Build the example with pigweed RCP

$ ./scripts/examples/gn_efr32_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app_rpc BRD4187C 'import("//with_pw_rpc.gni")'
$ ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app_rpc BRD4187C 'import("//with_pw_rpc.gni")'

or use GN/Ninja Directly

Expand All @@ -155,7 +155,7 @@ Silicon Labs platform.
For more build options, help is provided when running the build script without
arguments

./scripts/examples/gn_efr32_example.sh
./scripts/examples/gn_silabs_example.sh

## Flashing the Application

Expand Down Expand Up @@ -243,7 +243,7 @@ combination with JLinkRTTClient as follows:

- For this example to work, it is necessary to have a second efr32 device
running the
[lighting app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lighting-app/silabs/efr32/README.md)
[lighting app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lighting-app/silabs/README.md)
commissioned on the same openthread network

- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR
Expand Down Expand Up @@ -409,7 +409,7 @@ tracking code inside the `trackAlloc` and `trackFree` function
For the description of Software Update process with EFR32 example applications
see
[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md)
[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md)
## Building options
Expand All @@ -421,19 +421,19 @@ features can easily be toggled on or off. Here is a short list of options :
chip_progress_logging, chip_detail_logging, chip_automation_logging
$ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"
$ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"
### Debug build / release build
is_debug
$ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "is_debug=false"
$ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "is_debug=false"
### Disabling LCD
show_qr_code
$ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "show_qr_code=false"
$ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "show_qr_code=false"
### KVS maximum entry count
Expand All @@ -442,4 +442,4 @@ kvs_max_entries
Set the maximum Kvs entries that can be stored in NVM (Default 75)
Thresholds: 30 <= kvs_max_entries <= 255
$ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A kvs_max_entries=50
$ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A kvs_max_entries=50
1 change: 1 addition & 0 deletions examples/light-switch-app/silabs/build_overrides
1 change: 0 additions & 1 deletion examples/light-switch-app/silabs/efr32/build_overrides

This file was deleted.

This file was deleted.

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

assert(current_os == "freertos")

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

if (wifi_soc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Silicon Labs platform.
* Build the example application:

cd ~/connectedhomeip
./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app BRD4187C
./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app BRD4187C

- To delete generated executable, libraries and object files use:

Expand All @@ -125,15 +125,15 @@ Silicon Labs platform.

* Build the example as Sleepy End Device (SED)

$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_SED BRD4187C --sed
$ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_SED BRD4187C --sed

or use gn as previously mentioned but adding the following arguments:

$ gn gen out/debug '--args=SILABS_BOARD="BRD4187C" enable_sleepy_device=true chip_openthread_ftd=false'

* Build the example with pigweed RPC

$ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_rpc BRD4187C 'import("//with_pw_rpc.gni")'
$ ./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_rpc BRD4187C 'import("//with_pw_rpc.gni")'

or use GN/Ninja Directly

Expand All @@ -149,7 +149,7 @@ Silicon Labs platform.
For more build options, help is provided when running the build script without
arguments

./scripts/examples/gn_efr32_example.sh
./scripts/examples/gn_silabs_example.sh

## Flashing the Application

Expand Down Expand Up @@ -348,13 +348,13 @@ tracking code inside the `trackAlloc` and `trackFree` function

For the description of Software Update process with EFR32 example applications
see
[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md)
[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md)

## Group Communication (Multicast)

With this lighting example you can also use group communication to send Lighting
commands to multiples devices at once. Please refer to the
[chip-tool documentation](../../../chip-tool/README.md) _Configuring the server
[chip-tool documentation](../../chip-tool/README.md) _Configuring the server
side for Group Commands_ and _Using the Client to Send Group (Multicast) Matter
Commands_

Expand All @@ -369,19 +369,19 @@ passed to the build scripts.

`chip_progress_logging, chip_detail_logging, chip_automation_logging`

$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"
$ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false"

### Debug build / release build

`is_debug`

$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "is_debug=false"
$ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "is_debug=false"

### Disabling LCD

`show_qr_code`

$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "show_qr_code=false"
$ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A "show_qr_code=false"

### KVS maximum entry count

Expand All @@ -390,4 +390,4 @@ passed to the build scripts.
Set the maximum Kvs entries that can be stored in NVM (Default 75)
Thresholds: 30 <= kvs_max_entries <= 255

$ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50
$ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50
21 changes: 0 additions & 21 deletions examples/lighting-app/silabs/SiWx917/args.gni

This file was deleted.

32 changes: 0 additions & 32 deletions examples/lighting-app/silabs/SiWx917/with_pw_rpc.gni

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ import("${chip_root}/src/platform/silabs/wifi_args.gni")

chip_enable_ota_requestor = true
app_data_model =
"${chip_root}/examples/lighting-app/silabs/efr32/data_model:silabs-lighting"
"${chip_root}/examples/lighting-app/silabs/data_model:silabs-lighting"
1 change: 1 addition & 0 deletions examples/lighting-app/silabs/build_overrides
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../../../src/app/zap-templates/zcl/zcl.json",
"path": "../../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../../../src/app/zap-templates/app-templates.json",
"path": "../../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../../../src/app/zap-templates/zcl/zcl.json",
"path": "../../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../../../src/app/zap-templates/app-templates.json",
"path": "../../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
Expand Down
1 change: 0 additions & 1 deletion examples/lighting-app/silabs/efr32/build_overrides

This file was deleted.

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 1078656

Please sign in to comment.