diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index cf0317c61c190c..70784dd1e2d78f 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.7.3 + image: connectedhomeip/chip-build-telink:0.7.11 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/config/telink/app/enable-gnu-std.cmake b/config/telink/app/enable-gnu-std.cmake index e46c87199aad2d..a8a63cf63c95f0 100644 --- a/config/telink/app/enable-gnu-std.cmake +++ b/config/telink/app/enable-gnu-std.cmake @@ -15,5 +15,5 @@ # add_library(gnu17 INTERFACE) -target_compile_options(gnu17 INTERFACE $<$:-std=gnu++17> -D_SYS__PTHREADTYPES_H_) -target_link_libraries(app PRIVATE gnu17) \ No newline at end of file +target_compile_options(gnu17 INTERFACE $<$:-std=gnu++17> -Wno-register -D_DEFAULT_SOURCE) +target_link_libraries(app PRIVATE gnu17) diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index a8a4c0af92b8a7..680c6b4634fbe0 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -126,3 +126,20 @@ CONFIG_SHELL=n # BLE MAC address CONFIG_B91_BLE_CTRL_MAC_FLASH_ADDR=0x1FE000 + +# getopt version +CONFIG_GETOPT_LONG=y + +# flash stream functionality +CONFIG_STREAM_FLASH=y + +# In current config/zephyr/Kconfig +# next deprecated values are selected +# warning: Deprecated symbol CPLUSPLUS is enabled. +# warning: Deprecated symbol LIB_CPLUSPLUS is enabled. +# new one are: +# CONFIG_CPP +# CONFIG_LIBCPP_IMPLEMENTATION +# See https://docs.zephyrproject.org/latest/releases/release-notes-3.3.html +# Since not only Telink is using Zephyr just suppress warnings +CONFIG_WARN_DEPRECATED=n diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index e1953b324d3c07..8ff944fd1bfba2 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -48,7 +48,7 @@ include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake) # Prepare compiler flags if (CONFIG_POSIX_API) - matter_add_flags(-D_SYS__PTHREADTYPES_H_) + matter_add_flags(-D_DEFAULT_SOURCE) matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix) endif() diff --git a/examples/bridge-app/telink/prj.conf b/examples/bridge-app/telink/prj.conf index 777ae516050bee..72b6dce7e2866c 100644 --- a/examples/bridge-app/telink/prj.conf +++ b/examples/bridge-app/telink/prj.conf @@ -67,4 +67,4 @@ CONFIG_PM=n # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y -CONFIG_CHIP_OPENTHREAD_TX_POWER=9 +CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/lighting-app/telink/prj.conf b/examples/lighting-app/telink/prj.conf index 90b24645fc5002..71a134523d33c8 100644 --- a/examples/lighting-app/telink/prj.conf +++ b/examples/lighting-app/telink/prj.conf @@ -67,4 +67,4 @@ CONFIG_PM=n # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y -CONFIG_CHIP_OPENTHREAD_TX_POWER=9 +CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 \ No newline at end of file diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 341839796a4922..c6e455b611dc07 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -127,6 +127,8 @@ static int cmd_telink_reboot(const struct shell * shell, size_t argc, char ** ar shell_print(shell, "Performing board reboot..."); sys_reboot(); + + return 0; } SHELL_STATIC_SUBCMD_SET_CREATE(sub_telink, SHELL_CMD(reboot, NULL, "Reboot board command", cmd_telink_reboot), diff --git a/examples/temperature-measurement-app/telink/prj.conf b/examples/temperature-measurement-app/telink/prj.conf index 3f1a6e5bbc4e0d..63deb05cbddfcb 100644 --- a/examples/temperature-measurement-app/telink/prj.conf +++ b/examples/temperature-measurement-app/telink/prj.conf @@ -67,4 +67,4 @@ CONFIG_PM=y # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y -CONFIG_CHIP_OPENTHREAD_TX_POWER=9 +CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/examples/window-app/telink/prj.conf b/examples/window-app/telink/prj.conf index b6e89b2a8938ae..753040f73c6086 100644 --- a/examples/window-app/telink/prj.conf +++ b/examples/window-app/telink/prj.conf @@ -66,4 +66,4 @@ CONFIG_PM=y # Custom RF power values CONFIG_B91_BLE_CTRL_RF_POWER_P9P11DBM=y -CONFIG_CHIP_OPENTHREAD_TX_POWER=9 +CONFIG_OPENTHREAD_DEFAULT_TX_POWER=9 diff --git a/src/lib/shell/MainLoopZephyr.cpp b/src/lib/shell/MainLoopZephyr.cpp index 17b5d8438499a5..b82b04c14aaa33 100644 --- a/src/lib/shell/MainLoopZephyr.cpp +++ b/src/lib/shell/MainLoopZephyr.cpp @@ -28,8 +28,11 @@ static int cmd_matter(const struct shell * shell, size_t argc, char ** argv) chip::Shell::streamer_set_shell(shell); return (Engine::Root().ExecCommand(argc - 1, argv + 1) == CHIP_NO_ERROR) ? 0 : -ENOEXEC; } - +#ifdef BOARD_TLSR9518ADK80D +static int RegisterCommands(void) +#else static int RegisterCommands(const struct device * dev) +#endif /* BOARD_TLSR9518ADK80D */ { Engine::Root().RegisterDefaultCommands(); return 0; diff --git a/src/lib/support/CHIPArgParser.cpp b/src/lib/support/CHIPArgParser.cpp index 85aa4dba0f8bdd..ed123452442748 100644 --- a/src/lib/support/CHIPArgParser.cpp +++ b/src/lib/support/CHIPArgParser.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include diff --git a/src/platform/telink/ThreadStackManagerImpl.cpp b/src/platform/telink/ThreadStackManagerImpl.cpp index 7b56409bba1727..09ee1ab68b666e 100644 --- a/src/platform/telink/ThreadStackManagerImpl.cpp +++ b/src/platform/telink/ThreadStackManagerImpl.cpp @@ -47,13 +47,6 @@ CHIP_ERROR ThreadStackManagerImpl::_InitThreadStack() otInstance * const instance = openthread_get_default_instance(); ReturnErrorOnFailure(GenericThreadStackManagerImpl_OpenThread::DoInit(instance)); -#ifdef CONFIG_CHIP_OPENTHREAD_TX_POWER - /* On Zephyr platform otPlatRadioSetTransmitPower does not touch radio HW */ - if (otPlatRadioSetTransmitPower(OTInstance(), CONFIG_CHIP_OPENTHREAD_TX_POWER) != OT_ERROR_NONE) - { - ChipLogError(DeviceLayer, "Can't set OpenThread TX power"); - } -#endif /* CONFIG_CHIP_OPENTHREAD_TX_POWER */ UDPEndPointImplSockets::SetJoinMulticastGroupHandler([](InterfaceId, const IPAddress & address) { const otIp6Address otAddress = ToOpenThreadIP6Address(address);