diff --git a/examples/shell/efr32/BUILD.gn b/examples/shell/efr32/BUILD.gn index 0472ade263e320..ea683bed9362cf 100644 --- a/examples/shell/efr32/BUILD.gn +++ b/examples/shell/efr32/BUILD.gn @@ -49,10 +49,6 @@ efr32_sdk("sdk") { defines = [ "BOARD_ID=${efr32_board}", "OPENTHREAD_CONFIG_CLI_TRANSPORT=OT_CLI_TRANSPORT_CONSOLE", - "ENABLE_CHIP_SHELL", - - # shell app use openthread but do not have the NETWORK_COMMISSIONING cluster or zap config. - "_NO_NETWORK_COMMISSIONING_DRIVER_", ] } diff --git a/examples/shell/efr32/args.gni b/examples/shell/efr32/args.gni index 1b73ad66dcea58..9d49561c413334 100644 --- a/examples/shell/efr32/args.gni +++ b/examples/shell/efr32/args.gni @@ -22,3 +22,4 @@ pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" pw_assert_BACKEND = "$dir_pw_assert_log" chip_enable_openthread = true chip_openthread_ftd = true +chip_build_libshell = true diff --git a/examples/shell/efr32/include/CHIPProjectConfig.h b/examples/shell/efr32/include/CHIPProjectConfig.h index e5be53a055f434..b47c348e6df34c 100644 --- a/examples/shell/efr32/include/CHIPProjectConfig.h +++ b/examples/shell/efr32/include/CHIPProjectConfig.h @@ -113,3 +113,5 @@ * A size, in bytes, of the individual debug event logging buffer. */ #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +#define _NO_NETWORK_COMMISSIONING_DRIVER_ diff --git a/examples/shell/mbed/CMakeLists.txt b/examples/shell/mbed/CMakeLists.txt index c9a1457ad81485..fbd5b2576ecf9b 100644 --- a/examples/shell/mbed/CMakeLists.txt +++ b/examples/shell/mbed/CMakeLists.txt @@ -21,8 +21,6 @@ include(${MBED_PATH}/tools/cmake/app.cmake) project(${APP_TARGET}) -# shell app use openthread but do not have the NETWORK_COMMISSIONING cluster or zap config -add_definitions(-D_NO_NETWORK_COMMISSIONING_DRIVER_) add_subdirectory(${MBED_PATH} ./mbed_build) add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) diff --git a/examples/shell/mbed/main/include/CHIPProjectConfig.h b/examples/shell/mbed/main/include/CHIPProjectConfig.h index ab3dbbecc38342..07b341178959ec 100644 --- a/examples/shell/mbed/main/include/CHIPProjectConfig.h +++ b/examples/shell/mbed/main/include/CHIPProjectConfig.h @@ -33,3 +33,7 @@ // Use a default pairing code if one hasn't been provisioned in flash. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 + +// shell app use openthread but do not have the NETWORK_COMMISSIONING cluster or zap config +// Do not instanciate the NETWORK_COMMISSIONING thread driver +#define _NO_NETWORK_COMMISSIONING_DRIVER_ diff --git a/examples/shell/nrfconnect/CHIPProjectConfig.h b/examples/shell/nrfconnect/CHIPProjectConfig.h index cc90aa590dfd57..f5a73bcc81c664 100644 --- a/examples/shell/nrfconnect/CHIPProjectConfig.h +++ b/examples/shell/nrfconnect/CHIPProjectConfig.h @@ -42,3 +42,7 @@ * 0x4E53: nrfconnect shell */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x4E53 + +// shell app use openthread but do not have the NETWORK_COMMISSIONING cluster or zap config +// Do not instanciate the NETWORK_COMMISSIONING thread driver +#define _NO_NETWORK_COMMISSIONING_DRIVER_ diff --git a/examples/shell/nrfconnect/CMakeLists.txt b/examples/shell/nrfconnect/CMakeLists.txt index 41619f84e0445b..9940b0973bd046 100644 --- a/examples/shell/nrfconnect/CMakeLists.txt +++ b/examples/shell/nrfconnect/CMakeLists.txt @@ -31,9 +31,6 @@ endif() project(chip-nrfconnect-shell-example) -# shell app use openthread but do not have the NETWORK_COMMISSIONING cluster or zap config -add_definitions(-D_NO_NETWORK_COMMISSIONING_DRIVER_) - include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake) target_compile_options(app PRIVATE -Werror) diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp index 064c856947bc9e..3fe15b97a9cb58 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp @@ -24,8 +24,6 @@ #include #include -#include -#include using namespace chip; using namespace chip::Thread;