Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Software version string on efr32 chef build while doing automation testing #20982

Merged
merged 1 commit into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,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

flush_print(yaml.dump(config))
yaml.dump(config, configStream)
Expand Down Expand Up @@ -474,6 +475,10 @@ def main(argv: Sequence[str]) -> None:
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:
flush_print('EFR32_BOARD was not configured. Make sure silabs-thread.EFR32_BOARD is set on your config.yaml file')
exit(1)
efr32_board = config['silabs-thread']['EFR32_BOARD']
else:
flush_print(f"Target {options.build_target} not supported")

Expand Down Expand Up @@ -622,8 +627,21 @@ def main(argv: Sequence[str]) -> None:
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/efr32")
if options.do_clean:
shell.run_cmd(f"rm -rf out/{options.sample_device_type_name}")
shell.run_cmd(
f"""{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh ./ out/{options.sample_device_type_name} BRD4186A \'sample_name=\"{options.sample_device_type_name}\"\' enable_openthread_cli=true chip_build_libshell=true \'{'import("//with_pw_rpc.gni")' if options.do_rpc else ""}\'""")
efr32_cmd_args = []
efr32_cmd_args.append(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'\'sample_name=\"{options.sample_device_type_name}\"\'')
if sw_ver_string:
efr32_cmd_args.append(f'\'chip_device_config_device_software_version_string=\"{sw_ver_string}\"\'')
efr32_cmd_args.append('enable_openthread_cli=true')
if options.do_rpc:
efr32_cmd_args.append('chip_build_libshell=false')
efr32_cmd_args.append('\'import("//with_pw_rpc.gni")\'')
else:
efr32_cmd_args.append('chip_build_libshell=true')
shell.run_cmd(" ".join(efr32_cmd_args))
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}")

elif options.build_target == "linux":
Expand Down Expand Up @@ -719,7 +737,7 @@ def main(argv: Sequence[str]) -> None:
shell.run_cmd("west flash")
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}/BRD4186A/chip-efr32-chef-example.flash.py")
shell.run_cmd(f"python3 out/{options.sample_device_type_name}/{efr32_board}/chip-efr32-chef-example.flash.py")

shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}")

Expand Down
1 change: 1 addition & 0 deletions examples/chef/efr32/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")

chip_enable_ota_requestor = true

pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"
pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip"
pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
chip_enable_openthread = true
11 changes: 0 additions & 11 deletions examples/chef/efr32/include/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@
*/
#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1

/**
* CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
*
* A string identifying the software version running on the device.
* CHIP service currently expects the software version to be in the format
* {MAJOR_VERSION}.0d{MINOR_VERSION}
*/
#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "0.1ALPHA"
#endif

/**
* CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
*
Expand Down