Skip to content

Commit

Permalink
Fix build argument for custom examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs authored and jmartinez-silabs committed May 25, 2023
1 parent 9672c0a commit 5d5a1e4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion scripts/WIN_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ when running an example build script, the arguments and their order is
important.

```PowerShell
./scripts/examples/gn_efr32_example.sh <AppRootFolder> <outputFolder> <efr32_board_name> [<Build options>]
./scripts/examples/gn_efr32_example.sh <AppRootFolder> <outputFolder> <silabs_board_name> [<Build options>]
```

for example:
Expand Down
10 changes: 5 additions & 5 deletions silabs_examples/onoff-plug-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ if (chip_enable_wifi) {
}

# ThunderBoards and Explorer Kit (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B" ||
efr32_board == "BRD2703A") {
if (silabs_board == "BRD4166A" || silabs_board == "BRD2601B" ||
silabs_board == "BRD2703A") {
show_qr_code = false
disable_lcd = true
}

# WiFi settings
if (chip_enable_wifi) {
# disabling LCD for MG24 for wifi
if (efr32_board == "BRD4186A" || efr32_board == "BRD4187A") {
if (silabs_board == "BRD4186A" || silabs_board == "BRD4187A") {
show_qr_code = false
disable_lcd = true
}
Expand Down Expand Up @@ -133,7 +133,7 @@ efr32_sdk("sdk") {
]

defines = [
"BOARD_ID=${efr32_board}",
"BOARD_ID=${silabs_board}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
"OTA_PERIODIC_TIMEOUT=${OTA_periodic_query_timeout}",
Expand Down Expand Up @@ -324,7 +324,7 @@ efr32_executable("onoff_plug_app") {
defines += [ "HEAP_MONITORING" ]
}

ldscript = "${examples_plat_dir}/ldscripts/${efr32_family}.ld"
ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

Expand Down
2 changes: 1 addition & 1 deletion silabs_examples/onoff-plug-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Silicon Labs platform.

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

$ gn gen out/debug '--args=efr32_board="BRD4161A" enable_sleepy_device=true matter_openthread_ftd=false'
$ gn gen out/debug '--args=silabs_board="BRD4161A" enable_sleepy_device=true matter_openthread_ftd=false'

For more build options, help is provided when running the build script without
arguments
Expand Down
8 changes: 4 additions & 4 deletions silabs_examples/sl-newLight/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ if (chip_enable_wifi) {
}

# BRD4166A --> ThunderBoard Sense 2 (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") {
if (silabs_board == "BRD4166A" || silabs_board == "BRD4180A") {
show_qr_code = false
}

if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B") {
if (silabs_board == "BRD4166A" || silabs_board == "BRD2601B") {
rgb_led = true
}

Expand Down Expand Up @@ -125,7 +125,7 @@ efr32_sdk("sdk") {
]

defines = [
"BOARD_ID=${efr32_board}",
"BOARD_ID=${silabs_board}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
"OTA_PERIODIC_TIMEOUT=${OTA_periodic_query_timeout}",
Expand Down Expand Up @@ -323,7 +323,7 @@ efr32_executable("newLight_app") {
defines += [ "HEAP_MONITORING" ]
}

ldscript = "${examples_plat_dir}/ldscripts/${efr32_family}.ld"
ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

Expand Down
6 changes: 3 additions & 3 deletions silabs_examples/template/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if (chip_enable_wifi) {
}

# BRD4166A --> ThunderBoard Sense 2 (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") {
if (silabs_board == "BRD4166A" || silabs_board == "BRD4180A") {
show_qr_code = false
}

Expand Down Expand Up @@ -114,7 +114,7 @@ efr32_sdk("sdk") {
]

defines = [
"BOARD_ID=${efr32_board}",
"BOARD_ID=${silabs_board}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
"OTA_PERIODIC_TIMEOUT=${OTA_periodic_query_timeout}",
Expand Down Expand Up @@ -305,7 +305,7 @@ efr32_executable("template_app") {
defines += [ "HEAP_MONITORING" ]
}

ldscript = "${examples_plat_dir}/ldscripts/${efr32_family}.ld"
ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

Expand Down

0 comments on commit 5d5a1e4

Please sign in to comment.