diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 22d821d05083ac..fcdd5e4f37a777 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -543,6 +543,11 @@ def main(argv: Sequence[str]) -> None: shell.run_cmd(f"rm -rf {_CHEF_SCRIPT_PATH}/esp32/build") shell.run_cmd("idf.py fullclean") shell.run_cmd("idf.py build") + shell.run_cmd("idf.py build flashing_script") + shell.run_cmd( + f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz --files-from=chip-shell.flashbundle.txt)") + shell.run_cmd( + f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}") elif options.build_target == "nrfconnect": shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect") nrf_build_cmds = ["west build -b nrf52840dk_nrf52840"] @@ -567,6 +572,8 @@ def main(argv: Sequence[str]) -> None: import("//build_overrides/chip.gni") import("${{chip_root}}/config/standalone/args.gni") chip_shell_cmd_server = false + chip_build_libshell = true + chip_config_network_layer_ble = false target_defines = ["CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID={options.vid}", "CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID={options.pid}", "CONFIG_ENABLE_PW_RPC={'1' if options.do_rpc else '0'}"] """)) with open(f"{_CHEF_SCRIPT_PATH}/linux/sample.gni", "w") as f: @@ -577,7 +584,8 @@ def main(argv: Sequence[str]) -> None: if options.do_clean: shell.run_cmd(f"rm -rf out") if options.do_rpc: - shell.run_cmd("gn gen out --args='import(\"//with_pw_rpc.gni\")'") + shell.run_cmd( + "gn gen out --args='import(\"//with_pw_rpc.gni\")'") else: shell.run_cmd("gn gen out --args=''") shell.run_cmd("ninja -C out") diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 9bd88e4b53c03d..769bcef34d5777 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -33,14 +33,16 @@ project_dir = "./.." chip_data_model("chef-data-model") { zap_file = "${project_dir}/devices/${sample_zap_file}" - zap_pregenerated_dir = "${chip_root}/examples/chef/out/${sample_name}/zap-generated/" is_server = true } executable("${sample_name}") { - sources = [ "${project_dir}/linux/main.cpp" ] + sources = [ + "${project_dir}/common/stubs.cpp", + "${project_dir}/linux/main.cpp", + ] deps = [ ":chef-data-model", diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 73bbe04c60ea36..9d70ee4ab913dc 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -82,10 +82,11 @@ if(CONFIG_ENABLE_CHIP_SHELL) endif(CONFIG_ENABLE_CHIP_SHELL) target_sources(app PRIVATE - ${CHEF}/nrfconnect/main.cpp - ${GEN_DIR}/callback-stub.cpp - ${GEN_DIR}/IMClusterCommandHandler.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp + ${CHEF}/nrfconnect/main.cpp + ${CHEF}/common/stubs.cpp + ${GEN_DIR}/callback-stub.cpp + ${GEN_DIR}/IMClusterCommandHandler.cpp + ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp ) message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap)