From a40784d44c805bdd031bd9099da406fcc9181eed Mon Sep 17 00:00:00 2001 From: Sebastian Mauer Date: Mon, 28 Mar 2022 21:41:11 +0000 Subject: [PATCH 01/16] Build flash_script package for ESP32 Change-Id: I4e0375c9b9837b3b9f8a3d2570635536e7e34e42 Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1419520 Reviewed-by: Doug Ferraz --- examples/chef/chef.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 166192741b97c2..f6de0451ecb59b 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -353,6 +353,9 @@ def main(argv): queueCommand(f"rm -rf {paths['rootSampleFolder']}/esp32/build") queueCommand("idf.py fullclean") queueCommand("idf.py build") + queueCommand("idf.py build flashing_script") + queueCommand(f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz --files-from=chip-shell.flashbundle.txt)") + queueCommand(f"cp build/$(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz {paths['scriptFolder']}") elif options.buildTarget == "nrfconnect": queueCommand(f"cd {paths['rootSampleFolder']}/nrfconnect") if options.doClean: From 973143a85540c0d401436e8d9b83b4bbe7632d5a Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Fri, 25 Mar 2022 12:02:26 -0400 Subject: [PATCH 02/16] new: Wifi and Descriptor clusters on ESP32 Change-Id: I37b61425a55d8210c2286becce47917fddf54a3f Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1418359 Reviewed-by: Rob Oliver Reviewed-by: Kevin Cheung Reviewed-by: Jerry Lee --- examples/chef/esp32/main/CMakeLists.txt | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt index f242768177544e..d78dc540598cd1 100644 --- a/examples/chef/esp32/main/CMakeLists.txt +++ b/examples/chef/esp32/main/CMakeLists.txt @@ -145,6 +145,17 @@ pw_proto_library(button_service pw_protobuf.common_protos ) +pw_proto_library(descriptor_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/descriptor_service.proto + PREFIX + descriptor_service + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_protos +) + pw_proto_library(device_service SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.proto @@ -158,9 +169,23 @@ pw_proto_library(device_service pw_protobuf.common_protos ) +pw_proto_library(wifi_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.proto + INPUTS + ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.options + PREFIX + wifi_service + DEPS + pw_protobuf.common_protos + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos +) + target_link_libraries(${COMPONENT_LIB} PUBLIC attributes_service.nanopb_rpc button_service.nanopb_rpc + descriptor_service.nanopb_rpc device_service.nanopb_rpc pw_checksum pw_hdlc @@ -170,6 +195,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC pw_trace_tokenized.trace_buffer pw_trace_tokenized.rpc_service pw_trace_tokenized.protos.nanopb_rpc + wifi_service.nanopb_rpc ) target_link_options(${COMPONENT_LIB} @@ -181,6 +207,8 @@ target_compile_options(${COMPONENT_LIB} PRIVATE "-DPW_RPC_ATTRIBUTE_SERVICE=1" "-DPW_RPC_BUTTON_SERVICE=1" "-DPW_RPC_DEVICE_SERVICE=1" + "-DPW_RPC_DESCRIPTOR_SERVICE=1" + "-DPW_RPC_WIFI_SERVICE=1" "-DPW_RPC_TRACING_SERVICE=1") endif (CONFIG_ENABLE_PW_RPC) From 65f0f854094b4d31923fd96091b8cc3bdbb3f3e3 Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Tue, 29 Mar 2022 16:11:02 -0400 Subject: [PATCH 03/16] new: added stub file. Included callbacks for successful operation of lock/unlock commands Change-Id: I9f4d601feb3b043d3c6689775bcaf40a8c5564d2 Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1420959 Reviewed-by: Michael Spang Reviewed-by: Jerry Lee --- examples/chef/common/stubs.cpp | 16 ++++++++++++++++ examples/chef/esp32/main/CMakeLists.txt | 1 + examples/chef/linux/BUILD.gn | 5 ++++- examples/chef/nrfconnect/CMakeLists.txt | 1 + 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 examples/chef/common/stubs.cpp diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp new file mode 100644 index 00000000000000..ecc3ef52766d55 --- /dev/null +++ b/examples/chef/common/stubs.cpp @@ -0,0 +1,16 @@ +#include +#include +#include +#include +#include +#include + +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, chip::Optional pinCode) +{ + return true; +} + +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, chip::Optional pinCode) +{ + return true; +} diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt index d78dc540598cd1..6ebd23b7da224f 100644 --- a/examples/chef/esp32/main/CMakeLists.txt +++ b/examples/chef/esp32/main/CMakeLists.txt @@ -67,6 +67,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" + "${CMAKE_SOURCE_DIR}/../common" ) if (CONFIG_ENABLE_CHIP_SHELL) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 32e8d05a6dee3a..fd8b2b48a825cc 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -32,7 +32,10 @@ chip_data_model("chef-data-model") { } executable("${sample_name}") { - sources = [ "${project_dir}/linux/main.cpp" ] + sources = [ + "${project_dir}/linux/main.cpp", + "${project_dir}/common/stubs.cpp" + ] deps = [ ":chef-data-model", diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index d5f655604e528f..5b2209ec445ab7 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -75,6 +75,7 @@ target_sources(app PRIVATE ${APP_ROOT}/shell_common/cmd_ping.cpp ${APP_ROOT}/shell_common/cmd_send.cpp ${APP_ROOT}/nrfconnect/main.cpp + ${APP_ROOT}/common/stubs.cpp ${GEN_DIR}/callback-stub.cpp ${GEN_DIR}/IMClusterCommandHandler.cpp ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp From bbfe22e3c459cbf964a883ec51bc9e6b02cddbf5 Mon Sep 17 00:00:00 2001 From: MT Tsai Date: Mon, 28 Mar 2022 09:39:01 +0000 Subject: [PATCH 04/16] Enable PW RPC server on chef-built virtual device app Change-Id: I878955e9df26e893c136650654019a8fa14e2a8b Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1417979 Reviewed-by: Doug Ferraz --- examples/chef/chef.py | 7 +++- examples/chef/linux/BUILD.gn | 62 ++++++++++++++++++++++++++--- examples/chef/linux/main.cpp | 31 +++++++-------- examples/chef/linux/with_pw_rpc.gni | 40 +++++++++++++++++++ 4 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 examples/chef/linux/with_pw_rpc.gni diff --git a/examples/chef/chef.py b/examples/chef/chef.py index f6de0451ecb59b..dc22d31fa9ed4e 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -370,6 +370,8 @@ def main(argv): 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.doRPC else '0'}"] EOF @@ -380,7 +382,10 @@ def main(argv): true''') if options.doClean: queueCommand(f"rm -rf out") - queueCommand("gn gen out") + if options.doRPC: + queueCommand("gn gen out --args='import(\"//with_pw_rpc.gni\")'") + else: + queueCommand("gn gen out --args=''") queueCommand("ninja -C out") # diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index fd8b2b48a825cc..df3e5039de8326 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -12,23 +12,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/openthread.gni") import("${chip_root}/build/chip/tools.gni") +import("${chip_root}/src/app/common_flags.gni") import("${chip_root}/src/app/chip_data_model.gni") import("sample.gni") assert(chip_build_tools) +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +import("sample.gni") + 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 + is_server = true } executable("${sample_name}") { @@ -44,9 +52,51 @@ executable("${sample_name}") { "${chip_root}/src/lib/shell", "${chip_root}/src/platform", "${project_dir}/shell_common:shell_common", + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/lib", ] - cflags = [ "-Wconversion" ] + include_dirs = [ "include" ] + + if (chip_enable_pw_rpc) { + defines = [ + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LIGHTING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/platform/linux/Rpc.cpp", + "${dir_pigweed}/targets/host/system_rpc_server.cc", + ] + + deps += [ + "$dir_pw_hdlc:pw_rpc", + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_log", + "$dir_pw_rpc:server", + "$dir_pw_rpc:synchronized_channel_output", + "$dir_pw_rpc/system_server:facade", + "$dir_pw_stream:socket_stream", + "$dir_pw_stream:sys_io_stream", + "$dir_pw_sync:mutex", + "${chip_root}/config/linux/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:rpc_services", + ] + + deps += pw_build_LINK_DEPS + } else { + # The system_rpc_server.cc file is in pigweed and doesn't compile with + # -Wconversion, remove check for RPC build only. + cflags = [ "-Wconversion" ] + } output_dir = root_out_dir } @@ -55,4 +105,6 @@ group("chef") { deps = [ ":${sample_name}" ] } -import("//build_overrides/chip.gni") +group("default") { + deps = [ ":chef" ] +} diff --git a/examples/chef/linux/main.cpp b/examples/chef/linux/main.cpp index 0335bbb6e497e0..56b80dd313bdc4 100644 --- a/examples/chef/linux/main.cpp +++ b/examples/chef/linux/main.cpp @@ -1,6 +1,7 @@ /* * * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,32 +16,29 @@ * limitations under the License. */ -#include +#include -#include -#include -#include -#include +#include +#include #include +#include + #include -#include -#include using namespace chip; using namespace chip::Shell; -int main() +void ApplicationInit() {} + +int main(int argc, char * argv[]) { - chip::Platform::MemoryInit(); - chip::DeviceLayer::PlatformMgr().InitChipStack(); - chip::DeviceLayer::PlatformMgr().StartEventLoopTask(); -#if CHIP_DEVICE_CONFIG_ENABLE_WPA - chip::DeviceLayer::ConnectivityManagerImpl().StartWiFiManagement(); -#endif + if (ChipLinuxAppInit(argc, argv) != 0) + { + return -1; + } const int rc = Engine::Root().Init(); - if (rc != 0) { ChipLogError(Shell, "Streamer initialization failed: %d", rc); @@ -55,6 +53,7 @@ int main() cmd_app_server_init(); #endif - Engine::Root().RunMainLoop(); + ChipLinuxAppMainLoop(); + return 0; } diff --git a/examples/chef/linux/with_pw_rpc.gni b/examples/chef/linux/with_pw_rpc.gni new file mode 100644 index 00000000000000..e64dd0fe8a2b12 --- /dev/null +++ b/examples/chef/linux/with_pw_rpc.gni @@ -0,0 +1,40 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# add this gni as import in your build args to use pigweed in the example +# 'import("//with_pw_rpc.gni")' + +import("//build_overrides/chip.gni") + +import("${chip_root}/config/standalone/args.gni") + +import("//build_overrides/pigweed.gni") + +cpp_standard = "gnu++17" + +pw_log_BACKEND = "$dir_pw_log_basic" +pw_assert_BACKEND = "$dir_pw_assert_log" +pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" +pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" +pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc" +dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo" +pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock" +pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend" + +pw_build_LINK_DEPS = [ + "$dir_pw_assert:impl", + "$dir_pw_log:impl", +] + +chip_enable_pw_rpc = true From 5dd4248603aca66f77e7b151e93a820de9f0d1d9 Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Tue, 26 Apr 2022 12:42:03 -0400 Subject: [PATCH 05/16] cosmetic change Change-Id: Ia2063a395a8d3f16965356d4a76b0d9df0834e57 --- examples/chef/linux/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index df3e5039de8326..f0d81bb789b6c6 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -36,7 +36,7 @@ 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 + is_server = true } executable("${sample_name}") { From 14ad50afec1252e059446a24f0b5b700a96fe3b3 Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Tue, 26 Apr 2022 12:42:03 -0400 Subject: [PATCH 06/16] changes to linux pigweed dependencies. Still has issues building Pigweed Change-Id: I2be4e81f6c2e14112e31a0803813ef56d012b206 --- examples/chef/linux/BUILD.gn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index f0d81bb789b6c6..ee9e3e121f8622 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -17,7 +17,6 @@ import("//build_overrides/openthread.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/src/app/common_flags.gni") import("${chip_root}/src/app/chip_data_model.gni") -import("sample.gni") assert(chip_build_tools) @@ -46,12 +45,12 @@ executable("${sample_name}") { ] deps = [ + "${project_dir}/shell_common:shell_common", ":chef-data-model", "${chip_root}/src/controller", "${chip_root}/src/credentials", "${chip_root}/src/lib/shell", "${chip_root}/src/platform", - "${project_dir}/shell_common:shell_common", "${chip_root}/examples/platform/linux:app-main", "${chip_root}/src/lib", ] @@ -77,7 +76,6 @@ executable("${sample_name}") { "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_log", "$dir_pw_rpc:server", - "$dir_pw_rpc:synchronized_channel_output", "$dir_pw_rpc/system_server:facade", "$dir_pw_stream:socket_stream", "$dir_pw_stream:sys_io_stream", From 9afa0b2424723d9825a9a4ee4de526ea9b561aa0 Mon Sep 17 00:00:00 2001 From: vinitg1 <62729931+vinitg1@users.noreply.github.com> Date: Tue, 26 Apr 2022 12:02:01 -0500 Subject: [PATCH 07/16] Fix nrfconnect compilation errors (#17713) * Fix nrfconnect compilation errors * Chef: fix arguments for clean build --- examples/chef/chef.py | 4 ++-- examples/chef/nrfconnect/CMakeLists.txt | 2 +- examples/chef/nrfconnect/Kconfig | 5 +++-- examples/chef/nrfconnect/main.cpp | 4 +--- examples/chef/nrfconnect/prj.conf | 3 --- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index dc22d31fa9ed4e..7b2226c7af31bb 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -360,7 +360,7 @@ def main(argv): queueCommand(f"cd {paths['rootSampleFolder']}/nrfconnect") if options.doClean: # queueCommand(f"rm -rf {paths['rootSampleFolder']}/nrfconnect/build") - queueCommand(f"west build -b nrf52840dk_nrf52840") + queueCommand(f"west build -b nrf52840dk_nrf52840 -p always") else: queueCommand(f"west build -b nrf52840dk_nrf52840") elif options.buildTarget == "linux": @@ -411,7 +411,7 @@ def main(argv): elif options.buildTarget == "nrfconnect": queueCommand(f"cd {paths['rootSampleFolder']}/nrfconnect") if options.doErase: - queueCommand("rm -rf build") + queueCommand("west flash --erase") else: queueCommand("west flash") diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 5b2209ec445ab7..664ce704fe1e80 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -25,7 +25,7 @@ include(${CHEF}/project_include.cmake) get_filename_component(GEN_DIR ${CHEF}/out/${SAMPLE_NAME}/zap-generated REALPATH) -set(CONF_FILE prj.conf) +set(CONF_FILE ${CHIP_ROOT}/config/nrfconnect/app/sample-defaults.conf prj.conf) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CHIP_CFLAGS "${CHIP_CFLAGS} -DCHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID=${CONFIG_DEVICE_PRODUCT_ID}") diff --git a/examples/chef/nrfconnect/Kconfig b/examples/chef/nrfconnect/Kconfig index 2b1125e68bbef6..4bc7fbd39e7869 100644 --- a/examples/chef/nrfconnect/Kconfig +++ b/examples/chef/nrfconnect/Kconfig @@ -15,6 +15,7 @@ # mainmenu "Matter nRF Connect Chef Example Application" -rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults" -rsource "../../../config/nrfconnect/chip-module/Kconfig.features" +#rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults" +#rsource "../../../config/nrfconnect/chip-module/Kconfig.features" +rsource "../../../config/nrfconnect/chip-module/Kconfig" source "Kconfig.zephyr" diff --git a/examples/chef/nrfconnect/main.cpp b/examples/chef/nrfconnect/main.cpp index cd3c4ce3066f4e..bc7f210f82427a 100644 --- a/examples/chef/nrfconnect/main.cpp +++ b/examples/chef/nrfconnect/main.cpp @@ -87,9 +87,7 @@ CHIP_ERROR main() chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(kExtDiscoveryTimeoutSecs); // Start IM server - static chip::CommonCaseDeviceServerInitParams initParams; - (void) initParams.InitializeStaticResourcesBeforeServerInit(); - ReturnErrorOnFailure(chip::Server::GetInstance().Init(initParams)); + ReturnErrorOnFailure(chip::Server::GetInstance().Init()); chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/chef/nrfconnect/prj.conf b/examples/chef/nrfconnect/prj.conf index 71679d01cbba43..c868e1d0904e16 100644 --- a/examples/chef/nrfconnect/prj.conf +++ b/examples/chef/nrfconnect/prj.conf @@ -46,9 +46,6 @@ CONFIG_RESET_ON_FATAL_ERROR=n # Disable Matter OTA DFU CONFIG_CHIP_OTA_REQUESTOR=n -# Disable QSPI NOR -CONFIG_CHIP_QSPI_NOR=n - # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="CHIPProjectConfig.h" # 32773 == 0x8005 (example lighting-app) From 2d1ddf65bd82fe74126fc8e108a5064edab238eb Mon Sep 17 00:00:00 2001 From: Sebastian Mauer Date: Mon, 28 Mar 2022 21:41:11 +0000 Subject: [PATCH 08/16] Build flash_script package for ESP32 Change-Id: I4e0375c9b9837b3b9f8a3d2570635536e7e34e42 Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1419520 Reviewed-by: Doug Ferraz --- examples/chef/chef.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 6da1c9c582ae57..8ff9a8241ec4a5 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -353,6 +353,9 @@ def main(argv): queueCommand(f"rm -rf {paths['rootSampleFolder']}/esp32/build") queueCommand("idf.py fullclean") queueCommand("idf.py build") + queueCommand("idf.py build flashing_script") + queueCommand(f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz --files-from=chip-shell.flashbundle.txt)") + queueCommand(f"cp build/$(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz {paths['scriptFolder']}") elif options.buildTarget == "nrfconnect": queueCommand(f"cd {paths['rootSampleFolder']}/nrfconnect") if options.doClean: From 3362108e4fe4a30f6b21d1b5a91b81b560e7d717 Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Fri, 25 Mar 2022 12:02:26 -0400 Subject: [PATCH 09/16] new: Wifi and Descriptor clusters on ESP32 Change-Id: I37b61425a55d8210c2286becce47917fddf54a3f Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1418359 Reviewed-by: Rob Oliver Reviewed-by: Kevin Cheung Reviewed-by: Jerry Lee --- examples/chef/esp32/main/CMakeLists.txt | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt index f242768177544e..d78dc540598cd1 100644 --- a/examples/chef/esp32/main/CMakeLists.txt +++ b/examples/chef/esp32/main/CMakeLists.txt @@ -145,6 +145,17 @@ pw_proto_library(button_service pw_protobuf.common_protos ) +pw_proto_library(descriptor_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/descriptor_service.proto + PREFIX + descriptor_service + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos + DEPS + pw_protobuf.common_protos +) + pw_proto_library(device_service SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.proto @@ -158,9 +169,23 @@ pw_proto_library(device_service pw_protobuf.common_protos ) +pw_proto_library(wifi_service + SOURCES + ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.proto + INPUTS + ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.options + PREFIX + wifi_service + DEPS + pw_protobuf.common_protos + STRIP_PREFIX + ${CHIP_ROOT}/examples/common/pigweed/protos +) + target_link_libraries(${COMPONENT_LIB} PUBLIC attributes_service.nanopb_rpc button_service.nanopb_rpc + descriptor_service.nanopb_rpc device_service.nanopb_rpc pw_checksum pw_hdlc @@ -170,6 +195,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC pw_trace_tokenized.trace_buffer pw_trace_tokenized.rpc_service pw_trace_tokenized.protos.nanopb_rpc + wifi_service.nanopb_rpc ) target_link_options(${COMPONENT_LIB} @@ -181,6 +207,8 @@ target_compile_options(${COMPONENT_LIB} PRIVATE "-DPW_RPC_ATTRIBUTE_SERVICE=1" "-DPW_RPC_BUTTON_SERVICE=1" "-DPW_RPC_DEVICE_SERVICE=1" + "-DPW_RPC_DESCRIPTOR_SERVICE=1" + "-DPW_RPC_WIFI_SERVICE=1" "-DPW_RPC_TRACING_SERVICE=1") endif (CONFIG_ENABLE_PW_RPC) From 15536c560bb34f3dbd58d1daaecc127ea2d0bb44 Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Tue, 29 Mar 2022 16:11:02 -0400 Subject: [PATCH 10/16] new: added stub file. Included callbacks for successful operation of lock/unlock commands Change-Id: I9f4d601feb3b043d3c6689775bcaf40a8c5564d2 Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1420959 Reviewed-by: Michael Spang Reviewed-by: Jerry Lee --- examples/chef/common/stubs.cpp | 16 ++++++++++++++++ examples/chef/esp32/main/CMakeLists.txt | 1 + examples/chef/linux/BUILD.gn | 5 ++++- examples/chef/nrfconnect/CMakeLists.txt | 1 + 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 examples/chef/common/stubs.cpp diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp new file mode 100644 index 00000000000000..ecc3ef52766d55 --- /dev/null +++ b/examples/chef/common/stubs.cpp @@ -0,0 +1,16 @@ +#include +#include +#include +#include +#include +#include + +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, chip::Optional pinCode) +{ + return true; +} + +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, chip::Optional pinCode) +{ + return true; +} diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt index d78dc540598cd1..6ebd23b7da224f 100644 --- a/examples/chef/esp32/main/CMakeLists.txt +++ b/examples/chef/esp32/main/CMakeLists.txt @@ -67,6 +67,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" + "${CMAKE_SOURCE_DIR}/../common" ) if (CONFIG_ENABLE_CHIP_SHELL) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 32e8d05a6dee3a..fd8b2b48a825cc 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -32,7 +32,10 @@ chip_data_model("chef-data-model") { } executable("${sample_name}") { - sources = [ "${project_dir}/linux/main.cpp" ] + sources = [ + "${project_dir}/linux/main.cpp", + "${project_dir}/common/stubs.cpp" + ] deps = [ ":chef-data-model", diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 1cfbf5512c7ab2..664ce704fe1e80 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -75,6 +75,7 @@ target_sources(app PRIVATE ${APP_ROOT}/shell_common/cmd_ping.cpp ${APP_ROOT}/shell_common/cmd_send.cpp ${APP_ROOT}/nrfconnect/main.cpp + ${APP_ROOT}/common/stubs.cpp ${GEN_DIR}/callback-stub.cpp ${GEN_DIR}/IMClusterCommandHandler.cpp ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp From 92c9d8c03960f151b685ee3b793a93566690b6ee Mon Sep 17 00:00:00 2001 From: MT Tsai Date: Mon, 28 Mar 2022 09:39:01 +0000 Subject: [PATCH 11/16] Enable PW RPC server on chef-built virtual device app Change-Id: I878955e9df26e893c136650654019a8fa14e2a8b Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1417979 Reviewed-by: Doug Ferraz --- examples/chef/chef.py | 7 +++- examples/chef/linux/BUILD.gn | 62 ++++++++++++++++++++++++++--- examples/chef/linux/main.cpp | 31 +++++++-------- examples/chef/linux/with_pw_rpc.gni | 40 +++++++++++++++++++ 4 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 examples/chef/linux/with_pw_rpc.gni diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 8ff9a8241ec4a5..7b2226c7af31bb 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -370,6 +370,8 @@ def main(argv): 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.doRPC else '0'}"] EOF @@ -380,7 +382,10 @@ def main(argv): true''') if options.doClean: queueCommand(f"rm -rf out") - queueCommand("gn gen out") + if options.doRPC: + queueCommand("gn gen out --args='import(\"//with_pw_rpc.gni\")'") + else: + queueCommand("gn gen out --args=''") queueCommand("ninja -C out") # diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index fd8b2b48a825cc..df3e5039de8326 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -12,23 +12,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/openthread.gni") import("${chip_root}/build/chip/tools.gni") +import("${chip_root}/src/app/common_flags.gni") import("${chip_root}/src/app/chip_data_model.gni") import("sample.gni") assert(chip_build_tools) +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +import("sample.gni") + 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 + is_server = true } executable("${sample_name}") { @@ -44,9 +52,51 @@ executable("${sample_name}") { "${chip_root}/src/lib/shell", "${chip_root}/src/platform", "${project_dir}/shell_common:shell_common", + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/lib", ] - cflags = [ "-Wconversion" ] + include_dirs = [ "include" ] + + if (chip_enable_pw_rpc) { + defines = [ + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LIGHTING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/platform/linux/Rpc.cpp", + "${dir_pigweed}/targets/host/system_rpc_server.cc", + ] + + deps += [ + "$dir_pw_hdlc:pw_rpc", + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_log", + "$dir_pw_rpc:server", + "$dir_pw_rpc:synchronized_channel_output", + "$dir_pw_rpc/system_server:facade", + "$dir_pw_stream:socket_stream", + "$dir_pw_stream:sys_io_stream", + "$dir_pw_sync:mutex", + "${chip_root}/config/linux/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:rpc_services", + ] + + deps += pw_build_LINK_DEPS + } else { + # The system_rpc_server.cc file is in pigweed and doesn't compile with + # -Wconversion, remove check for RPC build only. + cflags = [ "-Wconversion" ] + } output_dir = root_out_dir } @@ -55,4 +105,6 @@ group("chef") { deps = [ ":${sample_name}" ] } -import("//build_overrides/chip.gni") +group("default") { + deps = [ ":chef" ] +} diff --git a/examples/chef/linux/main.cpp b/examples/chef/linux/main.cpp index 0335bbb6e497e0..56b80dd313bdc4 100644 --- a/examples/chef/linux/main.cpp +++ b/examples/chef/linux/main.cpp @@ -1,6 +1,7 @@ /* * * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,32 +16,29 @@ * limitations under the License. */ -#include +#include -#include -#include -#include -#include +#include +#include #include +#include + #include -#include -#include using namespace chip; using namespace chip::Shell; -int main() +void ApplicationInit() {} + +int main(int argc, char * argv[]) { - chip::Platform::MemoryInit(); - chip::DeviceLayer::PlatformMgr().InitChipStack(); - chip::DeviceLayer::PlatformMgr().StartEventLoopTask(); -#if CHIP_DEVICE_CONFIG_ENABLE_WPA - chip::DeviceLayer::ConnectivityManagerImpl().StartWiFiManagement(); -#endif + if (ChipLinuxAppInit(argc, argv) != 0) + { + return -1; + } const int rc = Engine::Root().Init(); - if (rc != 0) { ChipLogError(Shell, "Streamer initialization failed: %d", rc); @@ -55,6 +53,7 @@ int main() cmd_app_server_init(); #endif - Engine::Root().RunMainLoop(); + ChipLinuxAppMainLoop(); + return 0; } diff --git a/examples/chef/linux/with_pw_rpc.gni b/examples/chef/linux/with_pw_rpc.gni new file mode 100644 index 00000000000000..e64dd0fe8a2b12 --- /dev/null +++ b/examples/chef/linux/with_pw_rpc.gni @@ -0,0 +1,40 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# add this gni as import in your build args to use pigweed in the example +# 'import("//with_pw_rpc.gni")' + +import("//build_overrides/chip.gni") + +import("${chip_root}/config/standalone/args.gni") + +import("//build_overrides/pigweed.gni") + +cpp_standard = "gnu++17" + +pw_log_BACKEND = "$dir_pw_log_basic" +pw_assert_BACKEND = "$dir_pw_assert_log" +pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" +pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" +pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc" +dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo" +pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock" +pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend" + +pw_build_LINK_DEPS = [ + "$dir_pw_assert:impl", + "$dir_pw_log:impl", +] + +chip_enable_pw_rpc = true From a6cca58ade241ef44bfaff1e8c2b543bb83a6448 Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Tue, 26 Apr 2022 12:42:03 -0400 Subject: [PATCH 12/16] cosmetic change Change-Id: Ia2063a395a8d3f16965356d4a76b0d9df0834e57 --- examples/chef/linux/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index df3e5039de8326..f0d81bb789b6c6 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -36,7 +36,7 @@ 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 + is_server = true } executable("${sample_name}") { From 99e2a1b0c256400dcbe402318dd4ab974f791c7e Mon Sep 17 00:00:00 2001 From: Doug Ferraz Date: Tue, 26 Apr 2022 12:42:03 -0400 Subject: [PATCH 13/16] changes to linux pigweed dependencies. Still has issues building Pigweed Change-Id: I2be4e81f6c2e14112e31a0803813ef56d012b206 --- examples/chef/linux/BUILD.gn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index f0d81bb789b6c6..ee9e3e121f8622 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -17,7 +17,6 @@ import("//build_overrides/openthread.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/src/app/common_flags.gni") import("${chip_root}/src/app/chip_data_model.gni") -import("sample.gni") assert(chip_build_tools) @@ -46,12 +45,12 @@ executable("${sample_name}") { ] deps = [ + "${project_dir}/shell_common:shell_common", ":chef-data-model", "${chip_root}/src/controller", "${chip_root}/src/credentials", "${chip_root}/src/lib/shell", "${chip_root}/src/platform", - "${project_dir}/shell_common:shell_common", "${chip_root}/examples/platform/linux:app-main", "${chip_root}/src/lib", ] @@ -77,7 +76,6 @@ executable("${sample_name}") { "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_log", "$dir_pw_rpc:server", - "$dir_pw_rpc:synchronized_channel_output", "$dir_pw_rpc/system_server:facade", "$dir_pw_stream:socket_stream", "$dir_pw_stream:sys_io_stream", From 56f0ab4801d964f1757d2beb6faeb6df338704f2 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 26 Apr 2022 21:03:21 +0000 Subject: [PATCH 14/16] Restyled by gn --- examples/chef/linux/BUILD.gn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index ee9e3e121f8622..b2d2991cf506c8 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -15,8 +15,8 @@ import("//build_overrides/chip.gni") import("//build_overrides/openthread.gni") import("${chip_root}/build/chip/tools.gni") -import("${chip_root}/src/app/common_flags.gni") import("${chip_root}/src/app/chip_data_model.gni") +import("${chip_root}/src/app/common_flags.gni") assert(chip_build_tools) @@ -40,19 +40,19 @@ chip_data_model("chef-data-model") { executable("${sample_name}") { sources = [ + "${project_dir}/common/stubs.cpp", "${project_dir}/linux/main.cpp", - "${project_dir}/common/stubs.cpp" ] deps = [ - "${project_dir}/shell_common:shell_common", ":chef-data-model", + "${chip_root}/examples/platform/linux:app-main", "${chip_root}/src/controller", "${chip_root}/src/credentials", + "${chip_root}/src/lib", "${chip_root}/src/lib/shell", "${chip_root}/src/platform", - "${chip_root}/examples/platform/linux:app-main", - "${chip_root}/src/lib", + "${project_dir}/shell_common:shell_common", ] include_dirs = [ "include" ] From 8f0e372b0a2ad2a1aa8a0f0417bd31a0eec5a701 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 26 Apr 2022 21:03:22 +0000 Subject: [PATCH 15/16] Restyled by autopep8 --- examples/chef/chef.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 7b2226c7af31bb..e1b73af9ca46f2 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -354,8 +354,10 @@ def main(argv): queueCommand("idf.py fullclean") queueCommand("idf.py build") queueCommand("idf.py build flashing_script") - queueCommand(f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz --files-from=chip-shell.flashbundle.txt)") - queueCommand(f"cp build/$(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz {paths['scriptFolder']}") + queueCommand( + f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz --files-from=chip-shell.flashbundle.txt)") + queueCommand( + f"cp build/$(git rev-parse HEAD)-{options.sampleDeviceTypeName}.tar.xz {paths['scriptFolder']}") elif options.buildTarget == "nrfconnect": queueCommand(f"cd {paths['rootSampleFolder']}/nrfconnect") if options.doClean: @@ -383,7 +385,8 @@ def main(argv): if options.doClean: queueCommand(f"rm -rf out") if options.doRPC: - queueCommand("gn gen out --args='import(\"//with_pw_rpc.gni\")'") + queueCommand( + "gn gen out --args='import(\"//with_pw_rpc.gni\")'") else: queueCommand("gn gen out --args=''") queueCommand("ninja -C out") From fb353e1991ad0bb2df5450624f77286b651d30af Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 2 May 2022 15:07:44 +0000 Subject: [PATCH 16/16] Restyled by gn --- examples/chef/linux/BUILD.gn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 6dc0cc78159619..5201c3659e74bc 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -15,9 +15,9 @@ import("//build_overrides/chip.gni") import("//build_overrides/openthread.gni") import("${chip_root}/build/chip/tools.gni") -import("${chip_root}/src/app/common_flags.gni") import("${chip_root}/src/app/chip_data_model.gni") import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/app/common_flags.gni") assert(chip_build_tools) @@ -46,16 +46,16 @@ executable("${sample_name}") { ] deps = [ - "${project_dir}/shell_common:shell_common", ":chef-data-model", "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/examples/platform/linux:app-main", "${chip_root}/src/controller", "${chip_root}/src/credentials", "${chip_root}/src/lib", + "${chip_root}/src/lib", "${chip_root}/src/lib/shell", "${chip_root}/src/platform", - "${chip_root}/examples/platform/linux:app-main", - "${chip_root}/src/lib", + "${project_dir}/shell_common:shell_common", ] include_dirs = [ "include" ]