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

ESP32: Enable shell command for external platform feature #25648

3 changes: 3 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ endif()

if (CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM)
chip_gn_arg_append("chip_device_platform" "\"external\"")
if (CONFIG_ENABLE_CHIP_SHELL)
chip_gn_arg_append("chip_shell_platform" "\"esp32\"")
endif()
chip_gn_arg_append("chip_platform_target" "\"//${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}\"")
endif()

Expand Down
4 changes: 3 additions & 1 deletion src/lib/shell/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import("//build_overrides/chip.gni")

import("${chip_root}/src/lib/core/core.gni")
import("${chip_root}/src/lib/shell/shell_device.gni")
import("${chip_root}/src/platform/device.gni")

source_set("shell_core") {
Expand Down Expand Up @@ -43,7 +44,8 @@ static_library("shell") {
sources += [ "streamer_stdio.cpp" ]
}

if (chip_device_platform == "esp32") {
if (chip_device_platform == "esp32" ||
(chip_device_platform == "external" && chip_shell_platform == "esp32")) {
sources += [
"MainLoopESP32.cpp",
"streamer_esp32.cpp",
Expand Down
18 changes: 18 additions & 0 deletions src/lib/shell/shell_device.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2020 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.

declare_args() {
# Enable shell support
chip_shell_platform = ""
}