Skip to content

Commit

Permalink
Rename variable in missing location
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Sep 21, 2022
1 parent f78dfaa commit 2cb169b
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 136 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ concurrency:
jobs:
efr32:
name: EFR32
timeout-minutes: 110
timeout-minutes: 110

env:
EFR32_BOARD: BRD4161A
SILABS_BOARD: BRD4161A
BUILD_TYPE: gn_efr32

runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
efr32:
name: EFR32
env:
EFR32_BOARD: BRD4161A
SILABS_BOARD: BRD4161A
BUILD_DIRECTORY: out/lock_app_debug/BRD4161A

runs-on: ubuntu-latest
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
.environment/pigweed-venv/*.log
- name: Build example EFR32 Lock App
run: scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/
out/lock_app_debug $EFR32_BOARD
out/lock_app_debug $SILABS_BOARD

- name: Upload artifact
run: |
Expand All @@ -110,4 +110,4 @@ jobs:
--release-tag "${{ github.event.inputs.releaseTag }}" \
--bundle-files $BUILD_DIRECTORY/lock_app.flashbundle.txt \
--working-directory $BUILD_DIRECTORY \
--bundle-name efr32-$EFR32_BOARD-chip-lock-example
--bundle-name efr32-$SILABS_BOARD-chip-lock-example
12 changes: 6 additions & 6 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def load_config() -> None:
config["silabs-thread"]["GECKO_SDK"] = f"{_REPO_BASE_PATH}third_party/efr32_sdk/repo"
config["silabs-thread"]["TTY"] = None
config["silabs-thread"]["CU"] = None
config["silabs-thread"]["EFR32_BOARD"] = None
config["silabs-thread"]["SILABS_BOARD"] = None
config["ameba"]["AMEBA_SDK"] = None
config["ameba"]["MATTER_SDK"] = None
config["ameba"]["MODEL"] = 'D'
Expand Down Expand Up @@ -493,11 +493,11 @@ def main() -> int:
pass
elif options.build_target == "silabs-thread":
flush_print('Path to gecko sdk is configured within Matter.')
if 'EFR32_BOARD' not in config['silabs-thread'] or config['silabs-thread']['EFR32_BOARD'] is None:
if 'SILABS_BOARD' not in config['silabs-thread'] or config['silabs-thread']['SILABS_BOARD'] is None:
flush_print(
'EFR32_BOARD was not configured. Make sure silabs-thread.EFR32_BOARD is set on your config.yaml file')
'SILABS_BOARD was not configured. Make sure silabs-thread.SILABS_BOARD is set on your config.yaml file')
exit(1)
efr32_board = config['silabs-thread']['EFR32_BOARD']
silabs_board = config['silabs-thread']['SILABS_BOARD']
elif options.build_target == "ameba":
if config['ameba']['AMEBA_SDK'] is None:
flush_print(
Expand Down Expand Up @@ -669,7 +669,7 @@ def main() -> int:
f'{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh')
efr32_cmd_args.append('./')
efr32_cmd_args.append(f'out/{options.sample_device_type_name}')
efr32_cmd_args.append(f'{efr32_board}')
efr32_cmd_args.append(f'{silabs_board}')
efr32_cmd_args.append(
f'\'sample_name=\"{options.sample_device_type_name}\"\'')
if sw_ver_string:
Expand Down Expand Up @@ -808,7 +808,7 @@ def main() -> int:
elif (options.build_target == "silabs-thread") or (options.build_target == "silabs-wifi"):
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/efr32")
shell.run_cmd(
f"python3 out/{options.sample_device_type_name}/{efr32_board}/chip-efr32-chef-example.flash.py")
f"python3 out/{options.sample_device_type_name}/{silabs_board}/chip-efr32-chef-example.flash.py")

shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}")
elif (options.build_target == "ameba"):
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-build-vscode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ENV AMEBA_PATH=/opt/ameba/ambd_sdk_with_chip_non_NDA
ENV ANDROID_HOME=/opt/android/sdk
ENV ANDROID_NDK_HOME=/opt/android/android-ndk-r21b
ENV CY_TOOLS_PATHS="/opt/ModusToolbox/tools_2.4"
ENV EFR32_BOARD=BRD4161A
ENV SILABS_BOARD=BRD4161A
ENV IDF_PATH=/opt/espressif/esp-idf/
ENV IDF_TOOLS_PATH=/opt/espressif/tools
ENV IMX_SDK_ROOT=/opt/fsl-imx-xwayland/5.15-kirkstone/
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __init__(self,
root=app.BuildRoot(root),
runner=runner)
self.app = app
self.extra_gn_options = ['efr32_board="%s"' % board.GnArgName()]
self.extra_gn_options = ['silabs_board="%s"' % board.GnArgName()]

if enable_rpcs:
self.extra_gn_options.append('is_debug=false import("//with_pw_rpc.gni")')
Expand Down
224 changes: 112 additions & 112 deletions scripts/build/testdata/build_all_except_host.txt

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions scripts/examples/gn_efr32_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ env
USE_WIFI=false

SILABS_THREAD_TARGET=\""../silabs:ot-efr32-cert"\"
USAGE="./scripts/examples/gn_efr32_example.sh <AppRootFolder> <outputFolder> <efr32_board_name> [<Build options>]"
USAGE="./scripts/examples/gn_efr32_example.sh <AppRootFolder> <outputFolder> <silabs_board_name> [<Build options>]"

if [ "$#" == "0" ]; then
echo "Build script for EFR32 Matter apps
Expand All @@ -48,7 +48,7 @@ if [ "$#" == "0" ]; then
<outputFolder>
Desired location for the output files
<efr32_board_name>
<silabs_board_name>
Identifier of the board for which this app is built
Currently Supported :
BRD4161A
Expand Down Expand Up @@ -115,7 +115,7 @@ else
OUTDIR=$2

if [ "$#" -gt "2" ]; then
EFR32_BOARD=$3
SILABS_BOARD=$3
shift
fi

Expand Down Expand Up @@ -171,22 +171,22 @@ else
esac
done

if [ -z "$EFR32_BOARD" ]; then
echo "EFR32_BOARD not defined"
if [ -z "$SILABS_BOARD" ]; then
echo "SILABS_BOARD not defined"
exit 1
fi

BUILD_DIR=$OUTDIR/$EFR32_BOARD
BUILD_DIR=$OUTDIR/$SILABS_BOARD
echo BUILD_DIR="$BUILD_DIR"
if [ "$USE_WIFI" == true ]; then
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="silabs_board=\"$EFR32_BOARD\" $optArgs" "$BUILD_DIR"
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR"
else
# thread build
#
if [ -z "$optArgs" ]; then
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$EFR32_BOARD\"" "$BUILD_DIR"
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\"" "$BUILD_DIR"
else
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$EFR32_BOARD\" $optArgs" "$BUILD_DIR"
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR"
fi
fi
ninja -v -C "$BUILD_DIR"/
Expand Down
4 changes: 2 additions & 2 deletions third_party/silabs/silabs_board.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ declare_args() {
}

if (silabs_board == "") {
silabs_board = getenv("EFR32_BOARD")
silabs_board = getenv("SILABS_BOARD")
}

assert(silabs_board != "", "silabs_board must be specified")
Expand Down Expand Up @@ -92,6 +92,6 @@ if (silabs_board == "BRD4304A") {
silabs_mcu = "MGM240L022RNF"
} else {
print(
"Please provide a valid value for EFR32_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B, BRD2703A, BRD4317A)")
"Please provide a valid value for SILABS_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B, BRD2703A, BRD4317A)")
assert(false, "The board ${silabs_board} is unsupported")
}

0 comments on commit 2cb169b

Please sign in to comment.