From e6c2f8a54660d8022655202ebdda4693af610413 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Wed, 18 May 2022 09:24:57 +0800 Subject: [PATCH] Convert linebreak from CRLF to LF (#18511) * Convert linebreak from CRLF to LF * Use .gitattributes to set linebreak --- .gitattributes | 2 + .../lighting-common/src/ColorFormat.cpp | 264 ++++----- .../ota-requestor-app/mbed/CMakeLists.txt | 162 +++--- examples/pigweed-app/mbed/CMakeLists.txt | 134 ++--- .../bouffalolab/bl602/ldscripts/flash_rom.ld | 544 +++++++++--------- .../platform/mbed/bootloader/CMakeLists.txt | 82 +-- examples/shell/mbed/CMakeLists.txt | 156 ++--- .../tv-casting-app/android/App/gradlew.bat | 178 +++--- src/android/CHIPTool/gradlew.bat | 178 +++--- .../suites/certification/Test_TC_MOD_2_2.yaml | 160 +++--- .../suites/certification/Test_TC_MOD_3_3.yaml | 388 ++++++------- .../suites/certification/Test_TC_NC_1_16.yaml | 124 ++-- .../suites/certification/Test_TC_NC_1_3.yaml | 368 ++++++------ .../suites/certification/Test_TC_OCC_3_2.yaml | 156 ++--- src/platform/P6/app_platform_cfg.c | 198 +++---- src/platform/P6/app_platform_cfg.h | 104 ++-- .../mbed/integration_tests/pytest.ini | 14 +- third_party/android_deps/gradlew.bat | 178 +++--- 18 files changed, 1696 insertions(+), 1694 deletions(-) diff --git a/.gitattributes b/.gitattributes index 5e24eb54b5e560..af5568cf35ee6b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,5 @@ # And some specific generated files src/controller/python/chip/clusters/CHIPClusters.py linguist-generated src/controller/python/chip/clusters/Objects.py linguist-generated +# Let bat file use CRLF linebreak +**/*.bat eol=crlf diff --git a/examples/lighting-app/lighting-common/src/ColorFormat.cpp b/examples/lighting-app/lighting-common/src/ColorFormat.cpp index e4e63efff53db8..dd76eebb782768 100644 --- a/examples/lighting-app/lighting-common/src/ColorFormat.cpp +++ b/examples/lighting-app/lighting-common/src/ColorFormat.cpp @@ -1,132 +1,132 @@ -/* - * - * Copyright (c) 2021 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. - * 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. - */ - -#include "ColorFormat.h" - -#include - -// define a clamp macro to substitute the std::clamp macro which is available from C++17 onwards -#define clamp(a, min, max) ((a) < (min) ? (min) : ((a) > (max) ? (max) : (a))) - -RgbColor_t HsvToRgb(HsvColor_t hsv) -{ - RgbColor_t rgb; - - uint16_t i = hsv.h / 60; - uint16_t rgb_max = hsv.v; - uint16_t rgb_min = (uint16_t)(rgb_max * (100 - hsv.s)) / 100; - uint16_t diff = hsv.h % 60; - uint16_t rgb_adj = (uint16_t)((rgb_max - rgb_min) * diff) / 60; - - switch (i) - { - case 0: - rgb.r = (uint8_t) rgb_max; - rgb.g = (uint8_t)(rgb_min + rgb_adj); - rgb.b = (uint8_t) rgb_min; - break; - case 1: - rgb.r = (uint8_t)(rgb_max - rgb_adj); - rgb.g = (uint8_t) rgb_max; - rgb.b = (uint8_t) rgb_min; - break; - case 2: - rgb.r = (uint8_t) rgb_min; - rgb.g = (uint8_t) rgb_max; - rgb.b = (uint8_t)(rgb_min + rgb_adj); - break; - case 3: - rgb.r = (uint8_t) rgb_min; - rgb.g = (uint8_t)(rgb_max - rgb_adj); - rgb.b = (uint8_t) rgb_max; - break; - case 4: - rgb.r = (uint8_t)(rgb_min + rgb_adj); - rgb.g = (uint8_t) rgb_min; - rgb.b = (uint8_t) rgb_max; - break; - default: - rgb.r = (uint8_t) rgb_max; - rgb.g = (uint8_t) rgb_min; - rgb.b = (uint8_t)(rgb_max - rgb_adj); - break; - } - - return rgb; -} - -RgbColor_t XYToRgb(uint8_t Level, uint16_t currentX, uint16_t currentY) -{ - // convert xyY color space to RGB - - // https://www.easyrgb.com/en/math.php - // https://en.wikipedia.org/wiki/SRGB - // refer https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space - - // The currentX/currentY attribute contains the current value of the normalized chromaticity value of x/y. - // The value of x/y shall be related to the currentX/currentY attribute by the relationship - // x = currentX/65536 - // y = currentY/65536 - // z = 1-x-y - - RgbColor_t rgb; - - float x, y, z; - float X, Y, Z; - float r, g, b; - - x = ((float) currentX) / 65535.0f; - y = ((float) currentY) / 65535.0f; - - z = 1.0f - x - y; - - // Calculate XYZ values - - // Y - given brightness in 0 - 1 range - Y = ((float) Level) / 254.0f; - X = (Y / y) * x; - Z = (Y / y) * z; - - // X, Y and Z input refer to a D65/2° standard illuminant. - // sR, sG and sB (standard RGB) output range = 0 ÷ 255 - // convert XYZ to RGB - CIE XYZ to sRGB - X = X / 100.0f; - Y = Y / 100.0f; - Z = Z / 100.0f; - - r = (X * 3.2406f) - (Y * 1.5372f) - (Z * 0.4986f); - g = -(X * 0.9689f) + (Y * 1.8758f) + (Z * 0.0415f); - b = (X * 0.0557f) - (Y * 0.2040f) + (Z * 1.0570f); - - // apply gamma 2.2 correction - r = (r <= 0.0031308f ? 12.92f * r : (1.055f) * pow(r, (1.0f / 2.4f)) - 0.055f); - g = (g <= 0.0031308f ? 12.92f * g : (1.055f) * pow(g, (1.0f / 2.4f)) - 0.055f); - b = (b <= 0.0031308f ? 12.92f * b : (1.055f) * pow(b, (1.0f / 2.4f)) - 0.055f); - - // Round off - r = clamp(r, 0, 1); - g = clamp(g, 0, 1); - b = clamp(b, 0, 1); - - // these rgb values are in the range of 0 to 1, convert to limit of HW specific LED - rgb.r = (uint8_t)(r * 255); - rgb.g = (uint8_t)(g * 255); - rgb.b = (uint8_t)(b * 255); - - return rgb; -} +/* + * + * Copyright (c) 2021 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. + * 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. + */ + +#include "ColorFormat.h" + +#include + +// define a clamp macro to substitute the std::clamp macro which is available from C++17 onwards +#define clamp(a, min, max) ((a) < (min) ? (min) : ((a) > (max) ? (max) : (a))) + +RgbColor_t HsvToRgb(HsvColor_t hsv) +{ + RgbColor_t rgb; + + uint16_t i = hsv.h / 60; + uint16_t rgb_max = hsv.v; + uint16_t rgb_min = (uint16_t)(rgb_max * (100 - hsv.s)) / 100; + uint16_t diff = hsv.h % 60; + uint16_t rgb_adj = (uint16_t)((rgb_max - rgb_min) * diff) / 60; + + switch (i) + { + case 0: + rgb.r = (uint8_t) rgb_max; + rgb.g = (uint8_t)(rgb_min + rgb_adj); + rgb.b = (uint8_t) rgb_min; + break; + case 1: + rgb.r = (uint8_t)(rgb_max - rgb_adj); + rgb.g = (uint8_t) rgb_max; + rgb.b = (uint8_t) rgb_min; + break; + case 2: + rgb.r = (uint8_t) rgb_min; + rgb.g = (uint8_t) rgb_max; + rgb.b = (uint8_t)(rgb_min + rgb_adj); + break; + case 3: + rgb.r = (uint8_t) rgb_min; + rgb.g = (uint8_t)(rgb_max - rgb_adj); + rgb.b = (uint8_t) rgb_max; + break; + case 4: + rgb.r = (uint8_t)(rgb_min + rgb_adj); + rgb.g = (uint8_t) rgb_min; + rgb.b = (uint8_t) rgb_max; + break; + default: + rgb.r = (uint8_t) rgb_max; + rgb.g = (uint8_t) rgb_min; + rgb.b = (uint8_t)(rgb_max - rgb_adj); + break; + } + + return rgb; +} + +RgbColor_t XYToRgb(uint8_t Level, uint16_t currentX, uint16_t currentY) +{ + // convert xyY color space to RGB + + // https://www.easyrgb.com/en/math.php + // https://en.wikipedia.org/wiki/SRGB + // refer https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space + + // The currentX/currentY attribute contains the current value of the normalized chromaticity value of x/y. + // The value of x/y shall be related to the currentX/currentY attribute by the relationship + // x = currentX/65536 + // y = currentY/65536 + // z = 1-x-y + + RgbColor_t rgb; + + float x, y, z; + float X, Y, Z; + float r, g, b; + + x = ((float) currentX) / 65535.0f; + y = ((float) currentY) / 65535.0f; + + z = 1.0f - x - y; + + // Calculate XYZ values + + // Y - given brightness in 0 - 1 range + Y = ((float) Level) / 254.0f; + X = (Y / y) * x; + Z = (Y / y) * z; + + // X, Y and Z input refer to a D65/2° standard illuminant. + // sR, sG and sB (standard RGB) output range = 0 ÷ 255 + // convert XYZ to RGB - CIE XYZ to sRGB + X = X / 100.0f; + Y = Y / 100.0f; + Z = Z / 100.0f; + + r = (X * 3.2406f) - (Y * 1.5372f) - (Z * 0.4986f); + g = -(X * 0.9689f) + (Y * 1.8758f) + (Z * 0.0415f); + b = (X * 0.0557f) - (Y * 0.2040f) + (Z * 1.0570f); + + // apply gamma 2.2 correction + r = (r <= 0.0031308f ? 12.92f * r : (1.055f) * pow(r, (1.0f / 2.4f)) - 0.055f); + g = (g <= 0.0031308f ? 12.92f * g : (1.055f) * pow(g, (1.0f / 2.4f)) - 0.055f); + b = (b <= 0.0031308f ? 12.92f * b : (1.055f) * pow(b, (1.0f / 2.4f)) - 0.055f); + + // Round off + r = clamp(r, 0, 1); + g = clamp(g, 0, 1); + b = clamp(b, 0, 1); + + // these rgb values are in the range of 0 to 1, convert to limit of HW specific LED + rgb.r = (uint8_t)(r * 255); + rgb.g = (uint8_t)(g * 255); + rgb.b = (uint8_t)(b * 255); + + return rgb; +} diff --git a/examples/ota-requestor-app/mbed/CMakeLists.txt b/examples/ota-requestor-app/mbed/CMakeLists.txt index fde496b3ff7a31..3be94c365d3d39 100644 --- a/examples/ota-requestor-app/mbed/CMakeLists.txt +++ b/examples/ota-requestor-app/mbed/CMakeLists.txt @@ -1,81 +1,81 @@ -# Copyright (c) 2021 ARM Limited. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.19.0) - -get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) -get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) -get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) -get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH) - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/config.in - ${CMAKE_CURRENT_BINARY_DIR}/chip_build/config - @ONLY -) - -set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") -set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") -set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") -set(APP_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") -set(APP_TYPE ${MBED_APP_TYPE} CACHE INTERNAL "") -set(BOOT_ENABLED FALSE) -set(APP_TARGET chip-mbed-ota-requestor-app-example) - -if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") - set(BOOT_ENABLED TRUE) -endif() - -include(${MBED_PATH}/tools/cmake/app.cmake) -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) - list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) - list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) -endif() -include(${CHIP_ROOT}/src/app/chip_data_model.cmake) - -project(${APP_TARGET}) - -add_subdirectory(${MBED_PATH} ./mbed_build) -add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) - -add_executable(${APP_TARGET}) - -add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) - -mbed_configure_app_target(${APP_TARGET}) - -target_include_directories(${APP_TARGET} PRIVATE - main/include/ - ${GEN_DIR}/app-common - ${MBED_COMMON}/util/include - ${NLIO_ROOT} - ${GEN_DIR}/ota-requestor-app -) - -target_sources(${APP_TARGET} PRIVATE - main/main.cpp - main/AppTask.cpp - ${GEN_DIR}//ota-requestor-app/zap-generated/callback-stub.cpp - ${GEN_DIR}/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp - ${MBED_COMMON}/util/LEDWidget.cpp - ${MBED_COMMON}/util/DFUManager.cpp -) - -chip_configure_data_model(${APP_TARGET} - INCLUDE_SERVER - ZAP_FILE ${CHIP_ROOT}/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap - GEN_DIR ${CHIP_ROOT}/zzz_generated/ota-requestor-app/zap-generated -) - -target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) - -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") - target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) -endif() - -mbed_set_post_build(${APP_TARGET}) - -option(VERBOSE_BUILD "Have a verbose build process") -if(VERBOSE_BUILD) - set(CMAKE_VERBOSE_MAKEFILE ON) -endif() +# Copyright (c) 2021 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.19.0) + +get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) +get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) +get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) +get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/config.in + ${CMAKE_CURRENT_BINARY_DIR}/chip_build/config + @ONLY +) + +set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") +set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") +set(APP_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") +set(APP_TYPE ${MBED_APP_TYPE} CACHE INTERNAL "") +set(BOOT_ENABLED FALSE) +set(APP_TARGET chip-mbed-ota-requestor-app-example) + +if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") + set(BOOT_ENABLED TRUE) +endif() + +include(${MBED_PATH}/tools/cmake/app.cmake) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) + list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) + list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) +endif() +include(${CHIP_ROOT}/src/app/chip_data_model.cmake) + +project(${APP_TARGET}) + +add_subdirectory(${MBED_PATH} ./mbed_build) +add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) + +add_executable(${APP_TARGET}) + +add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) + +mbed_configure_app_target(${APP_TARGET}) + +target_include_directories(${APP_TARGET} PRIVATE + main/include/ + ${GEN_DIR}/app-common + ${MBED_COMMON}/util/include + ${NLIO_ROOT} + ${GEN_DIR}/ota-requestor-app +) + +target_sources(${APP_TARGET} PRIVATE + main/main.cpp + main/AppTask.cpp + ${GEN_DIR}//ota-requestor-app/zap-generated/callback-stub.cpp + ${GEN_DIR}/ota-requestor-app/zap-generated/IMClusterCommandHandler.cpp + ${MBED_COMMON}/util/LEDWidget.cpp + ${MBED_COMMON}/util/DFUManager.cpp +) + +chip_configure_data_model(${APP_TARGET} + INCLUDE_SERVER + ZAP_FILE ${CHIP_ROOT}/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap + GEN_DIR ${CHIP_ROOT}/zzz_generated/ota-requestor-app/zap-generated +) + +target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) + +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) +endif() + +mbed_set_post_build(${APP_TARGET}) + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif() diff --git a/examples/pigweed-app/mbed/CMakeLists.txt b/examples/pigweed-app/mbed/CMakeLists.txt index 7e2e7e2b85e9eb..f00d52cb5060fd 100644 --- a/examples/pigweed-app/mbed/CMakeLists.txt +++ b/examples/pigweed-app/mbed/CMakeLists.txt @@ -1,67 +1,67 @@ -# Copyright (c) 2021 ARM Limited. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.19.0) - -get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) -get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/config.in - ${CMAKE_CURRENT_BINARY_DIR}/chip_build/config - @ONLY -) - -set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") -set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") -set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") -set(APP_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") -set(APP_TYPE ${MBED_APP_TYPE} CACHE INTERNAL "") -set(BOOT_ENABLED FALSE) -set(APP_TARGET chip-mbed-pigweed-app-example) - -if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") - set(BOOT_ENABLED TRUE) -endif() - -include(${MBED_PATH}/tools/cmake/app.cmake) -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) - list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) - list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) -endif() - -project(${APP_TARGET}) - -add_subdirectory(${MBED_PATH} ./mbed_build) -add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) - -add_executable(${APP_TARGET}) - -add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) - -mbed_configure_app_target(${APP_TARGET}) - -target_include_directories(${APP_TARGET} PRIVATE - main/include/ - ${MBED_COMMON}/util/include - ${CHIP_ROOT}/src/lib/support -) - -target_sources(${APP_TARGET} PRIVATE - main/main.cpp - ${MBED_COMMON}/util/LEDWidget.cpp - ${MBED_COMMON}/util/DFUManager.cpp -) - -target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) - -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") - target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) -endif() - -mbed_set_post_build(${APP_TARGET}) - -option(VERBOSE_BUILD "Have a verbose build process") -if(VERBOSE_BUILD) - set(CMAKE_VERBOSE_MAKEFILE ON) -endif() +# Copyright (c) 2021 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.19.0) + +get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) +get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/config.in + ${CMAKE_CURRENT_BINARY_DIR}/chip_build/config + @ONLY +) + +set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") +set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") +set(APP_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") +set(APP_TYPE ${MBED_APP_TYPE} CACHE INTERNAL "") +set(BOOT_ENABLED FALSE) +set(APP_TARGET chip-mbed-pigweed-app-example) + +if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") + set(BOOT_ENABLED TRUE) +endif() + +include(${MBED_PATH}/tools/cmake/app.cmake) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) + list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) + list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) +endif() + +project(${APP_TARGET}) + +add_subdirectory(${MBED_PATH} ./mbed_build) +add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) + +add_executable(${APP_TARGET}) + +add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) + +mbed_configure_app_target(${APP_TARGET}) + +target_include_directories(${APP_TARGET} PRIVATE + main/include/ + ${MBED_COMMON}/util/include + ${CHIP_ROOT}/src/lib/support +) + +target_sources(${APP_TARGET} PRIVATE + main/main.cpp + ${MBED_COMMON}/util/LEDWidget.cpp + ${MBED_COMMON}/util/DFUManager.cpp +) + +target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) + +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) +endif() + +mbed_set_post_build(${APP_TARGET}) + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif() diff --git a/examples/platform/bouffalolab/bl602/ldscripts/flash_rom.ld b/examples/platform/bouffalolab/bl602/ldscripts/flash_rom.ld index 45ec9eacc10192..e6bbaa458c9b5f 100644 --- a/examples/platform/bouffalolab/bl602/ldscripts/flash_rom.ld +++ b/examples/platform/bouffalolab/bl602/ldscripts/flash_rom.ld @@ -1,272 +1,272 @@ -OUTPUT_ARCH( "riscv" ) - -ENTRY( bl602_start ) - -__EM_SIZE = DEFINED(ble_controller_init) ? 8K : 0K; -__RFTLV_SIZE_OFFSET = 1K; -__RFTLV_SIZE_HOLE = 2K; -__RFTLV_HEAD1_H = (0x46524C42); /* BLRF */ -__RFTLV_HEAD1_L = (0x41524150); /* PAPA */ - -__RAM_START = 0x4200C000; -__RAM_END = 0x4200C000 + 256K - __EM_SIZE; /* leave 8K left for BLE */ - -__RAM_TCM_LEN = (16K + 16K + 48K + 64K + 64K - 16K); -__RAM_WIFI_LEN = (__RAM_END - __RAM_START - __RAM_TCM_LEN); - -MEMORY -{ - rom (rxai!w) : ORIGIN = 0x21015000, LENGTH = 44K - flash (rxai!w) : ORIGIN = 0x23000000, LENGTH = 4M - - /* ram_tcm (wxa) : ORIGIN = 0x4200C000, LENGTH = (16K + 16K + 48K + 64K + 64K + 8K - __EM_SIZE) put itcm with dtam and also OCRAM*/ - /* ram_wifi (wxa) : ORIGIN = 0x42042000 - __EM_SIZE, LENGTH = (8K + 104K - 64K - 8K) leave 8K left for BLE*/ - - ram_tcm (wxa) : ORIGIN = __RAM_START, LENGTH = __RAM_TCM_LEN - ram_wifi (wxa) : ORIGIN = __RAM_START + __RAM_TCM_LEN, LENGTH = __RAM_WIFI_LEN -} - -SECTIONS -{ - __stack_size = DEFINED(__stack_size) ? __stack_size : 2K; - BOOT2_PT_ADDR = 0x42049C00; - BOOT2_FLASHCFG_ADDR = 0x42049c18; - - .init : - { - KEEP (*(SORT_NONE(.init))) - } > flash - - /* value for rftlv */ - - .rftlv.tool : - { - . = ORIGIN(flash) + __RFTLV_SIZE_OFFSET; - PROVIDE( _ld_symbol_rftlv_address = . ); - LONG(__RFTLV_HEAD1_H); - LONG(__RFTLV_HEAD1_L); - . = ORIGIN(flash) + __RFTLV_SIZE_OFFSET + __RFTLV_SIZE_HOLE; - } > flash - - .text : - { - *(.text.unlikely .text.unlikely.*) - *(.text.startup .text.startup.*) - *(.text .text.*) - *(.gnu.linkonce.t.*) - } > flash - - .rodata : - { - *(.rdata) - *(.rodata .rodata.*) - *(.sdata2.*) - - /* static cli cmds */ - . = ALIGN(4); - _bl_static_cli_cmds_start = .; - KEEP(*(.static_cli_cmds)) - *(.static_cli_cmds) - _bl_static_cli_cmds_end = .; - - /* CI cmds */ - . = ALIGN(4); - KEEP(*(.ctest)) - - /* static fw attribute entry */ - . = ALIGN(4); - _bl_static_fw_cfg_entry_start = .; - KEEP(*(.wifi.cfg.entry)) - _bl_static_fw_cfg_entry_end = .; - - /* static blog code1 */ - . = ALIGN(4); - _bl_static_blogcomponent_code_start = .; - KEEP(SORT(*)(.static_blogcomponent_code*)) - *(.static_blogcomponent_code*) - _bl_static_blogcomponent_code_end = .; - - /* static blog code2 */ - . = ALIGN(4); - _bl_static_blogfile_code_start = .; - KEEP(SORT(*)(.static_blogfile_code*)) - *(.static_blogfile_code*) - _bl_static_blogfile_code_end = .; - - /* static blog code3 */ - . = ALIGN(4); - _bl_static_blogpri_code_start = .; - KEEP(SORT(*)(.static_blogpri_code*)) - *(.static_blogpri_code*) - _bl_static_blogpri_code_end = .; - - *(.gnu.linkonce.r.*) - - /*Framework table section, use ALIGN here to avoid fill section*/ - . = ALIGN(4); - _rom_framework_audio_device_start = .; - KEEP(*(.framework.audio_device)) - _rom_framework_audio_device_end = .; - } > flash - - .preinit_array : - { - . = ALIGN(4); - __preinit_array_start = .; - KEEP (*(.preinit_array)) - __preinit_array_end = .; - } > flash - - .init_array : - { - . = ALIGN(4); - __init_array_start = .; - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) - KEEP (*(.init_array)) - __init_array_end = .; - } > flash - - /*put wifibss in the first place*/ - .wifibss (NOLOAD) : - { - PROVIDE( __wifi_bss_start = ADDR(.wifibss) ); - PROVIDE( __wifi_bss_end = ADDR(.wifibss) + SIZEOF(.wifibss) ); - *ipc_shared.o(COMMON) - *sdu_shared.o(COMMON) - *hal_desc.o(COMMON) - *txl_buffer_shared.o(COMMON) - *txl_frame_shared.o(COMMON) - *scan_shared.o(COMMON) - *scanu_shared.o(COMMON) - *mfp_bip.o(COMMON) - *me_mic.o(COMMON) - *bl_sta_mgmt_others.o(COMMON) - *bl_pmk_mgmt.o(COMMON) - *bl_pmk_mgmt_internal.o(COMMON) - *libwifi_drv.a:bl_utils.o(COMMON) - *libwifi_drv.a:bl_utils.o(.bss*) - *(.wifi_ram*) - . = ALIGN(16); - } > ram_wifi - - PROVIDE( _heap_wifi_start = . ); - PROVIDE( _heap_wifi_size = ORIGIN(ram_wifi) + LENGTH(ram_wifi) - _heap_wifi_start ); - - .romdata : - { - /*always put freetos under global_pointer with the following order. No change!*/ - PROVIDE( __global_pointer_head$ = . ); - PROVIDE( __global_pointer$ = . + 0x7F0 ); - . = . + 0x498; - } > ram_tcm AT > flash - - .data : - { - PROVIDE( _data_load = LOADADDR(.data) ); - PROVIDE( _data_run = ADDR(.data) ); - PROVIDE( _data_run_end = ADDR(.data) + SIZEOF(.data)); - - *(.tcm_code) - *(.tcm_const) - *(.sclock_rlt_code) - *(.sclock_rlt_const) - *(.data .data.*) - *(.gnu.linkonce.d.*) - - *(.sdata .sdata.*) - *(.gnu.linkonce.s.*) - - . = ALIGN(8); - *(.srodata.cst16) - *(.srodata.cst8) - *(.srodata.cst4) - *(.srodata.cst2) - *(.srodata .srodata.*) - - . = ALIGN(8); - *(._k_queue.static.*) - *(._k_sem.static.*) - *(._k_mutex.static.*) - _bt_gatt_service_static_list_start = .; - KEEP(*(SORT_BY_NAME("._bt_gatt_service_static.static.*"))) - _bt_gatt_service_static_list_end = .; - _bt_l2cap_fixed_chan_list_start = .; - KEEP(*(SORT_BY_NAME("._bt_l2cap_fixed_chan.static.*"))) - _bt_l2cap_fixed_chan_list_end = .; - - /* For BFLB Coredump */ - _coredump_binary_id_start = . - ADDR(.data) + LOADADDR(.data); - KEEP(*(.coredump_binary_id)) - - } > ram_tcm AT > flash - - .boot2 (NOLOAD) : - { - PROVIDE ( __boot2_pt_addr_start = . ); - *(.bss.boot2_partition_table) - PROVIDE ( __boot2_pt_addr_end = . ); - - PROVIDE ( __boot2_flashCfg_start = . ); - *(.bss.boot2_flashCfg) - PROVIDE ( __boot2_flashCfg_end = . ); - - } > ram_tcm - - .bss (NOLOAD) : - { - PROVIDE( __bss_start = ADDR(.bss) ); - PROVIDE( __bss_end = ADDR(.bss) + SIZEOF(.bss) ); - - *(.sbss*) - *(.gnu.linkonce.sb.*) - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - } > ram_tcm - - .stack (NOLOAD) : - { - PROVIDE ( _sp_base = . ); - . = ALIGN(16); - . = . + __stack_size; - PROVIDE( _sp_main = . ); - __freertos_irq_stack_top = .; - } - - PROVIDE( _heap_start = . ); - PROVIDE( _heap_size = ORIGIN(ram_tcm) + LENGTH(ram_tcm) - _heap_start ); - - /*SYMOBOL used in code*/ - PROVIDE( _ld_bl_static_cli_cmds_start = _bl_static_cli_cmds_start ); - PROVIDE( _ld_bl_static_cli_cmds_end = _bl_static_cli_cmds_end ); - - /*CFG FW used in code*/ - PROVIDE( _ld_bl_static_cfg_entry_start = _bl_static_fw_cfg_entry_start ); - PROVIDE( _ld_bl_static_cfg_entry_end = _bl_static_fw_cfg_entry_end ); - - /* blog */ - PROVIDE( _ld_bl_static_blogcomponent_code_start = _bl_static_blogcomponent_code_start ); - PROVIDE( _ld_bl_static_blogcomponent_code_end = _bl_static_blogcomponent_code_end ); - PROVIDE( _ld_bl_static_blogfile_code_start = _bl_static_blogfile_code_start ); - PROVIDE( _ld_bl_static_blogfile_code_end = _bl_static_blogfile_code_end ); - PROVIDE( _ld_bl_static_blogpri_code_start = _bl_static_blogpri_code_start ); - PROVIDE( _ld_bl_static_blogpri_code_end = _bl_static_blogpri_code_end ); - - PROVIDE( _ld_ram_size0 = LENGTH(flash) ); - PROVIDE( _ld_ram_addr0 = ORIGIN(flash) ); - PROVIDE( _ld_ram_size1 = LENGTH(ram_tcm) ); - PROVIDE( _ld_ram_addr1 = ORIGIN(ram_tcm) ); - PROVIDE( _ld_ram_size2 = LENGTH(ram_wifi) ); - PROVIDE( _ld_ram_addr2 = ORIGIN(ram_wifi) ); - - - /*BOOT2 sections*/ - PROVIDE ( __boot2_pt_addr_src = BOOT2_PT_ADDR ); - PROVIDE ( __boot2_flashCfg_src = BOOT2_FLASHCFG_ADDR ); - - PROVIDE(__LD_CONFIG_EM_SEL = __EM_SIZE); - - PROVIDE( _ld_symbol_rom_framework_audio_device_start = _rom_framework_audio_device_start); - PROVIDE( _ld_symbol_rom_framework_audio_device_end = _rom_framework_audio_device_end); - -} +OUTPUT_ARCH( "riscv" ) + +ENTRY( bl602_start ) + +__EM_SIZE = DEFINED(ble_controller_init) ? 8K : 0K; +__RFTLV_SIZE_OFFSET = 1K; +__RFTLV_SIZE_HOLE = 2K; +__RFTLV_HEAD1_H = (0x46524C42); /* BLRF */ +__RFTLV_HEAD1_L = (0x41524150); /* PAPA */ + +__RAM_START = 0x4200C000; +__RAM_END = 0x4200C000 + 256K - __EM_SIZE; /* leave 8K left for BLE */ + +__RAM_TCM_LEN = (16K + 16K + 48K + 64K + 64K - 16K); +__RAM_WIFI_LEN = (__RAM_END - __RAM_START - __RAM_TCM_LEN); + +MEMORY +{ + rom (rxai!w) : ORIGIN = 0x21015000, LENGTH = 44K + flash (rxai!w) : ORIGIN = 0x23000000, LENGTH = 4M + + /* ram_tcm (wxa) : ORIGIN = 0x4200C000, LENGTH = (16K + 16K + 48K + 64K + 64K + 8K - __EM_SIZE) put itcm with dtam and also OCRAM*/ + /* ram_wifi (wxa) : ORIGIN = 0x42042000 - __EM_SIZE, LENGTH = (8K + 104K - 64K - 8K) leave 8K left for BLE*/ + + ram_tcm (wxa) : ORIGIN = __RAM_START, LENGTH = __RAM_TCM_LEN + ram_wifi (wxa) : ORIGIN = __RAM_START + __RAM_TCM_LEN, LENGTH = __RAM_WIFI_LEN +} + +SECTIONS +{ + __stack_size = DEFINED(__stack_size) ? __stack_size : 2K; + BOOT2_PT_ADDR = 0x42049C00; + BOOT2_FLASHCFG_ADDR = 0x42049c18; + + .init : + { + KEEP (*(SORT_NONE(.init))) + } > flash + + /* value for rftlv */ + + .rftlv.tool : + { + . = ORIGIN(flash) + __RFTLV_SIZE_OFFSET; + PROVIDE( _ld_symbol_rftlv_address = . ); + LONG(__RFTLV_HEAD1_H); + LONG(__RFTLV_HEAD1_L); + . = ORIGIN(flash) + __RFTLV_SIZE_OFFSET + __RFTLV_SIZE_HOLE; + } > flash + + .text : + { + *(.text.unlikely .text.unlikely.*) + *(.text.startup .text.startup.*) + *(.text .text.*) + *(.gnu.linkonce.t.*) + } > flash + + .rodata : + { + *(.rdata) + *(.rodata .rodata.*) + *(.sdata2.*) + + /* static cli cmds */ + . = ALIGN(4); + _bl_static_cli_cmds_start = .; + KEEP(*(.static_cli_cmds)) + *(.static_cli_cmds) + _bl_static_cli_cmds_end = .; + + /* CI cmds */ + . = ALIGN(4); + KEEP(*(.ctest)) + + /* static fw attribute entry */ + . = ALIGN(4); + _bl_static_fw_cfg_entry_start = .; + KEEP(*(.wifi.cfg.entry)) + _bl_static_fw_cfg_entry_end = .; + + /* static blog code1 */ + . = ALIGN(4); + _bl_static_blogcomponent_code_start = .; + KEEP(SORT(*)(.static_blogcomponent_code*)) + *(.static_blogcomponent_code*) + _bl_static_blogcomponent_code_end = .; + + /* static blog code2 */ + . = ALIGN(4); + _bl_static_blogfile_code_start = .; + KEEP(SORT(*)(.static_blogfile_code*)) + *(.static_blogfile_code*) + _bl_static_blogfile_code_end = .; + + /* static blog code3 */ + . = ALIGN(4); + _bl_static_blogpri_code_start = .; + KEEP(SORT(*)(.static_blogpri_code*)) + *(.static_blogpri_code*) + _bl_static_blogpri_code_end = .; + + *(.gnu.linkonce.r.*) + + /*Framework table section, use ALIGN here to avoid fill section*/ + . = ALIGN(4); + _rom_framework_audio_device_start = .; + KEEP(*(.framework.audio_device)) + _rom_framework_audio_device_end = .; + } > flash + + .preinit_array : + { + . = ALIGN(4); + __preinit_array_start = .; + KEEP (*(.preinit_array)) + __preinit_array_end = .; + } > flash + + .init_array : + { + . = ALIGN(4); + __init_array_start = .; + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) + KEEP (*(.init_array)) + __init_array_end = .; + } > flash + + /*put wifibss in the first place*/ + .wifibss (NOLOAD) : + { + PROVIDE( __wifi_bss_start = ADDR(.wifibss) ); + PROVIDE( __wifi_bss_end = ADDR(.wifibss) + SIZEOF(.wifibss) ); + *ipc_shared.o(COMMON) + *sdu_shared.o(COMMON) + *hal_desc.o(COMMON) + *txl_buffer_shared.o(COMMON) + *txl_frame_shared.o(COMMON) + *scan_shared.o(COMMON) + *scanu_shared.o(COMMON) + *mfp_bip.o(COMMON) + *me_mic.o(COMMON) + *bl_sta_mgmt_others.o(COMMON) + *bl_pmk_mgmt.o(COMMON) + *bl_pmk_mgmt_internal.o(COMMON) + *libwifi_drv.a:bl_utils.o(COMMON) + *libwifi_drv.a:bl_utils.o(.bss*) + *(.wifi_ram*) + . = ALIGN(16); + } > ram_wifi + + PROVIDE( _heap_wifi_start = . ); + PROVIDE( _heap_wifi_size = ORIGIN(ram_wifi) + LENGTH(ram_wifi) - _heap_wifi_start ); + + .romdata : + { + /*always put freetos under global_pointer with the following order. No change!*/ + PROVIDE( __global_pointer_head$ = . ); + PROVIDE( __global_pointer$ = . + 0x7F0 ); + . = . + 0x498; + } > ram_tcm AT > flash + + .data : + { + PROVIDE( _data_load = LOADADDR(.data) ); + PROVIDE( _data_run = ADDR(.data) ); + PROVIDE( _data_run_end = ADDR(.data) + SIZEOF(.data)); + + *(.tcm_code) + *(.tcm_const) + *(.sclock_rlt_code) + *(.sclock_rlt_const) + *(.data .data.*) + *(.gnu.linkonce.d.*) + + *(.sdata .sdata.*) + *(.gnu.linkonce.s.*) + + . = ALIGN(8); + *(.srodata.cst16) + *(.srodata.cst8) + *(.srodata.cst4) + *(.srodata.cst2) + *(.srodata .srodata.*) + + . = ALIGN(8); + *(._k_queue.static.*) + *(._k_sem.static.*) + *(._k_mutex.static.*) + _bt_gatt_service_static_list_start = .; + KEEP(*(SORT_BY_NAME("._bt_gatt_service_static.static.*"))) + _bt_gatt_service_static_list_end = .; + _bt_l2cap_fixed_chan_list_start = .; + KEEP(*(SORT_BY_NAME("._bt_l2cap_fixed_chan.static.*"))) + _bt_l2cap_fixed_chan_list_end = .; + + /* For BFLB Coredump */ + _coredump_binary_id_start = . - ADDR(.data) + LOADADDR(.data); + KEEP(*(.coredump_binary_id)) + + } > ram_tcm AT > flash + + .boot2 (NOLOAD) : + { + PROVIDE ( __boot2_pt_addr_start = . ); + *(.bss.boot2_partition_table) + PROVIDE ( __boot2_pt_addr_end = . ); + + PROVIDE ( __boot2_flashCfg_start = . ); + *(.bss.boot2_flashCfg) + PROVIDE ( __boot2_flashCfg_end = . ); + + } > ram_tcm + + .bss (NOLOAD) : + { + PROVIDE( __bss_start = ADDR(.bss) ); + PROVIDE( __bss_end = ADDR(.bss) + SIZEOF(.bss) ); + + *(.sbss*) + *(.gnu.linkonce.sb.*) + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + } > ram_tcm + + .stack (NOLOAD) : + { + PROVIDE ( _sp_base = . ); + . = ALIGN(16); + . = . + __stack_size; + PROVIDE( _sp_main = . ); + __freertos_irq_stack_top = .; + } + + PROVIDE( _heap_start = . ); + PROVIDE( _heap_size = ORIGIN(ram_tcm) + LENGTH(ram_tcm) - _heap_start ); + + /*SYMOBOL used in code*/ + PROVIDE( _ld_bl_static_cli_cmds_start = _bl_static_cli_cmds_start ); + PROVIDE( _ld_bl_static_cli_cmds_end = _bl_static_cli_cmds_end ); + + /*CFG FW used in code*/ + PROVIDE( _ld_bl_static_cfg_entry_start = _bl_static_fw_cfg_entry_start ); + PROVIDE( _ld_bl_static_cfg_entry_end = _bl_static_fw_cfg_entry_end ); + + /* blog */ + PROVIDE( _ld_bl_static_blogcomponent_code_start = _bl_static_blogcomponent_code_start ); + PROVIDE( _ld_bl_static_blogcomponent_code_end = _bl_static_blogcomponent_code_end ); + PROVIDE( _ld_bl_static_blogfile_code_start = _bl_static_blogfile_code_start ); + PROVIDE( _ld_bl_static_blogfile_code_end = _bl_static_blogfile_code_end ); + PROVIDE( _ld_bl_static_blogpri_code_start = _bl_static_blogpri_code_start ); + PROVIDE( _ld_bl_static_blogpri_code_end = _bl_static_blogpri_code_end ); + + PROVIDE( _ld_ram_size0 = LENGTH(flash) ); + PROVIDE( _ld_ram_addr0 = ORIGIN(flash) ); + PROVIDE( _ld_ram_size1 = LENGTH(ram_tcm) ); + PROVIDE( _ld_ram_addr1 = ORIGIN(ram_tcm) ); + PROVIDE( _ld_ram_size2 = LENGTH(ram_wifi) ); + PROVIDE( _ld_ram_addr2 = ORIGIN(ram_wifi) ); + + + /*BOOT2 sections*/ + PROVIDE ( __boot2_pt_addr_src = BOOT2_PT_ADDR ); + PROVIDE ( __boot2_flashCfg_src = BOOT2_FLASHCFG_ADDR ); + + PROVIDE(__LD_CONFIG_EM_SEL = __EM_SIZE); + + PROVIDE( _ld_symbol_rom_framework_audio_device_start = _rom_framework_audio_device_start); + PROVIDE( _ld_symbol_rom_framework_audio_device_end = _rom_framework_audio_device_end); + +} diff --git a/examples/platform/mbed/bootloader/CMakeLists.txt b/examples/platform/mbed/bootloader/CMakeLists.txt index eecdaf64fa2e33..94a705e374f42b 100644 --- a/examples/platform/mbed/bootloader/CMakeLists.txt +++ b/examples/platform/mbed/bootloader/CMakeLists.txt @@ -1,41 +1,41 @@ -# Copyright (c) 2021 ARM Limited. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) - -set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") -set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") -set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") -set(APP_TARGET chip-mbed-bootloader) - -include(${MBED_PATH}/tools/cmake/app.cmake) - -project(${APP_TARGET}) - -add_subdirectory(${MBED_PATH} ./mbed_build) -add_subdirectory(${MCUBOOT_PATH}/boot/bootutil/ ./mbed_mcu_boot_util) -add_subdirectory(${MCUBOOT_PATH}/boot/mbed/ ./mbed_mcu_boot) # Mbed-MCUboot Port - -add_executable(${APP_TARGET}) - -target_sources(${APP_TARGET} - PUBLIC - default_bd.cpp - signing_keys.c -) - -target_link_libraries(${APP_TARGET} - PUBLIC - bootutil - mbed-mcuboot - mbed-storage-spif - mbed-storage-qspif - mbed-baremetal -) - -mbed_set_post_build(${APP_TARGET}) - -option(VERBOSE_BUILD "Have a verbose build process") -if(VERBOSE_BUILD) - set(CMAKE_VERBOSE_MAKEFILE ON) -endif() +# Copyright (c) 2021 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) + +set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") +set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") +set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") +set(APP_TARGET chip-mbed-bootloader) + +include(${MBED_PATH}/tools/cmake/app.cmake) + +project(${APP_TARGET}) + +add_subdirectory(${MBED_PATH} ./mbed_build) +add_subdirectory(${MCUBOOT_PATH}/boot/bootutil/ ./mbed_mcu_boot_util) +add_subdirectory(${MCUBOOT_PATH}/boot/mbed/ ./mbed_mcu_boot) # Mbed-MCUboot Port + +add_executable(${APP_TARGET}) + +target_sources(${APP_TARGET} + PUBLIC + default_bd.cpp + signing_keys.c +) + +target_link_libraries(${APP_TARGET} + PUBLIC + bootutil + mbed-mcuboot + mbed-storage-spif + mbed-storage-qspif + mbed-baremetal +) + +mbed_set_post_build(${APP_TARGET}) + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif() diff --git a/examples/shell/mbed/CMakeLists.txt b/examples/shell/mbed/CMakeLists.txt index da45aeb1a7b94f..d6ab2192877e9d 100644 --- a/examples/shell/mbed/CMakeLists.txt +++ b/examples/shell/mbed/CMakeLists.txt @@ -1,78 +1,78 @@ -# Copyright (c) 2021 ARM Limited. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.19.0) - -get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) -get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) -get_filename_component(SHELL_COMMON ${CHIP_ROOT}/examples/shell/shell_common REALPATH) -get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) -get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH) - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/config.in - ${CMAKE_CURRENT_BINARY_DIR}/chip_build/config - @ONLY -) - -set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") -set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") -set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") -set(APP_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") -set(APP_TYPE ${MBED_APP_TYPE} CACHE INTERNAL "") -set(BOOT_ENABLED FALSE) -set(APP_TARGET chip-mbed-shell-example) - -if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") - set(BOOT_ENABLED TRUE) -endif() - -include(${MBED_PATH}/tools/cmake/app.cmake) -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) - list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) - list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) -endif() - -project(${APP_TARGET}) - - -add_subdirectory(${MBED_PATH} ./mbed_build) -add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) - -add_executable(${APP_TARGET}) - -add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) - -mbed_configure_app_target(${APP_TARGET}) - -target_include_directories(${APP_TARGET} PRIVATE - main/include - ${MBED_COMMON}/util/include - ${SHELL_COMMON}/include - ${GEN_DIR}/app-common - ${NLIO_ROOT} -) - -target_sources(${APP_TARGET} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/main/main.cpp - ${SHELL_COMMON}/cmd_misc.cpp - ${SHELL_COMMON}/cmd_otcli.cpp - ${SHELL_COMMON}/cmd_ping.cpp - ${SHELL_COMMON}/cmd_send.cpp - ${SHELL_COMMON}/cmd_server.cpp - ${SHELL_COMMON}/globals.cpp - ${MBED_COMMON}/util/DFUManager.cpp -) - -target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) - -if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") - target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) -endif() - -mbed_set_post_build(${APP_TARGET}) - -option(VERBOSE_BUILD "Have a verbose build process") -if(VERBOSE_BUILD) - set(CMAKE_VERBOSE_MAKEFILE ON) -endif() +# Copyright (c) 2021 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.19.0) + +get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) +get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) +get_filename_component(SHELL_COMMON ${CHIP_ROOT}/examples/shell/shell_common REALPATH) +get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) +get_filename_component(NLIO_ROOT ${CHIP_ROOT}/third_party/nlio/repo/include REALPATH) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/config.in + ${CMAKE_CURRENT_BINARY_DIR}/chip_build/config + @ONLY +) + +set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") +set(MCUBOOT_PATH ${MBED_MCU_BOOT_PATH} CACHE INTERNAL "") +set(APP_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") +set(APP_TYPE ${MBED_APP_TYPE} CACHE INTERNAL "") +set(BOOT_ENABLED FALSE) +set(APP_TARGET chip-mbed-shell-example) + +if(APP_TYPE STREQUAL "boot" OR APP_TYPE STREQUAL "upgrade") + set(BOOT_ENABLED TRUE) +endif() + +include(${MBED_PATH}/tools/cmake/app.cmake) +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W" AND BOOT_ENABLED) + list(REMOVE_ITEM MBED_TARGET_LABELS CM0P_SLEEP) + list(REMOVE_ITEM MBED_TARGET_DEFINITIONS COMPONENT_CM0P_SLEEP=1) +endif() + +project(${APP_TARGET}) + + +add_subdirectory(${MBED_PATH} ./mbed_build) +add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) + +add_executable(${APP_TARGET}) + +add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) + +mbed_configure_app_target(${APP_TARGET}) + +target_include_directories(${APP_TARGET} PRIVATE + main/include + ${MBED_COMMON}/util/include + ${SHELL_COMMON}/include + ${GEN_DIR}/app-common + ${NLIO_ROOT} +) + +target_sources(${APP_TARGET} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/main/main.cpp + ${SHELL_COMMON}/cmd_misc.cpp + ${SHELL_COMMON}/cmd_otcli.cpp + ${SHELL_COMMON}/cmd_ping.cpp + ${SHELL_COMMON}/cmd_send.cpp + ${SHELL_COMMON}/cmd_server.cpp + ${SHELL_COMMON}/globals.cpp + ${MBED_COMMON}/util/DFUManager.cpp +) + +target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) + +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) +endif() + +mbed_set_post_build(${APP_TARGET}) + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif() diff --git a/examples/tv-casting-app/android/App/gradlew.bat b/examples/tv-casting-app/android/App/gradlew.bat index ac1b06f93825db..107acd32c4e687 100644 --- a/examples/tv-casting-app/android/App/gradlew.bat +++ b/examples/tv-casting-app/android/App/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/android/CHIPTool/gradlew.bat b/src/android/CHIPTool/gradlew.bat index ac1b06f93825db..107acd32c4e687 100644 --- a/src/android/CHIPTool/gradlew.bat +++ b/src/android/CHIPTool/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml index 2cf06c17806e7b..7629e158dfd919 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml @@ -1,80 +1,80 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 78.2.2. [TC-MOD-2.2] ChangeToMode Verification (DUT as Client) - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "DUT reads the SupportedModes attribute from the TH" - verification: | - ./chip-tool modeselect read supported-modes 1 1 - [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries - [1645776742.669546][4661:4666] CHIP:TOO: [1]: { - [1645776742.669588][4661:4666] CHIP:TOO: Label: Black - [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 - [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 - [1645776742.669661][4661:4666] CHIP:TOO: } - [1645776742.669692][4661:4666] CHIP:TOO: [2]: { - [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino - [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 - [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: 0 - [1645776742.669779][4661:4666] CHIP:TOO: } - [1645776742.669808][4661:4666] CHIP:TOO: [3]: { - [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso - [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 - [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 - [1645776742.669896][4661:4666] CHIP:TOO: } - disabled: true - - - label: - "DUT sends a ChangeToMode command to the TH with a integer from the - list in step 1." - verification: | - ./chip-tool modeselect change-to-mode 4 1 1 - [1645778189.043893][4888:4893] CHIP:DMG: InvokeResponseMessage = - [1645778189.043924][4888:4893] CHIP:DMG: { - [1645778189.043953][4888:4893] CHIP:DMG: suppressResponse = false, - [1645778189.043986][4888:4893] CHIP:DMG: InvokeResponseIBs = - [1645778189.044027][4888:4893] CHIP:DMG: [ - [1645778189.044056][4888:4893] CHIP:DMG: InvokeResponseIB = - [1645778189.044100][4888:4893] CHIP:DMG: { - [1645778189.044132][4888:4893] CHIP:DMG: CommandStatusIB = - [1645778189.044171][4888:4893] CHIP:DMG: { - [1645778189.044203][4888:4893] CHIP:DMG: CommandPathIB = - [1645778189.044239][4888:4893] CHIP:DMG: { - [1645778189.044277][4888:4893] CHIP:DMG: EndpointId = 0x1, - [1645778189.044319][4888:4893] CHIP:DMG: ClusterId = 0x50, - [1645778189.044361][4888:4893] CHIP:DMG: CommandId = 0x0, - [1645778189.044394][4888:4893] CHIP:DMG: }, - [1645778189.044435][4888:4893] CHIP:DMG: - [1645778189.044472][4888:4893] CHIP:DMG: StatusIB = - [1645778189.044519][4888:4893] CHIP:DMG: { - [1645778189.044558][4888:4893] CHIP:DMG: status = 0x0, - [1645778189.044603][4888:4893] CHIP:DMG: }, - [1645778189.044650][4888:4893] CHIP:DMG: - [1645778189.044686][4888:4893] CHIP:DMG: }, - [1645778189.044724][4888:4893] CHIP:DMG: - [1645778189.044754][4888:4893] CHIP:DMG: }, - [1645778189.044793][4888:4893] CHIP:DMG: - [1645778189.044821][4888:4893] CHIP:DMG: ], - [1645778189.044896][4888:4893] CHIP:DMG: - [1645778189.044925][4888:4893] CHIP:DMG: InteractionModelRevision = 1 - [1645778189.044954][4888:4893] CHIP:DMG: }, - [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x0 - disabled: true +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 78.2.2. [TC-MOD-2.2] ChangeToMode Verification (DUT as Client) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "DUT reads the SupportedModes attribute from the TH" + verification: | + ./chip-tool modeselect read supported-modes 1 1 + [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries + [1645776742.669546][4661:4666] CHIP:TOO: [1]: { + [1645776742.669588][4661:4666] CHIP:TOO: Label: Black + [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 + [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669661][4661:4666] CHIP:TOO: } + [1645776742.669692][4661:4666] CHIP:TOO: [2]: { + [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino + [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 + [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669779][4661:4666] CHIP:TOO: } + [1645776742.669808][4661:4666] CHIP:TOO: [3]: { + [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso + [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 + [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669896][4661:4666] CHIP:TOO: } + disabled: true + + - label: + "DUT sends a ChangeToMode command to the TH with a integer from the + list in step 1." + verification: | + ./chip-tool modeselect change-to-mode 4 1 1 + [1645778189.043893][4888:4893] CHIP:DMG: InvokeResponseMessage = + [1645778189.043924][4888:4893] CHIP:DMG: { + [1645778189.043953][4888:4893] CHIP:DMG: suppressResponse = false, + [1645778189.043986][4888:4893] CHIP:DMG: InvokeResponseIBs = + [1645778189.044027][4888:4893] CHIP:DMG: [ + [1645778189.044056][4888:4893] CHIP:DMG: InvokeResponseIB = + [1645778189.044100][4888:4893] CHIP:DMG: { + [1645778189.044132][4888:4893] CHIP:DMG: CommandStatusIB = + [1645778189.044171][4888:4893] CHIP:DMG: { + [1645778189.044203][4888:4893] CHIP:DMG: CommandPathIB = + [1645778189.044239][4888:4893] CHIP:DMG: { + [1645778189.044277][4888:4893] CHIP:DMG: EndpointId = 0x1, + [1645778189.044319][4888:4893] CHIP:DMG: ClusterId = 0x50, + [1645778189.044361][4888:4893] CHIP:DMG: CommandId = 0x0, + [1645778189.044394][4888:4893] CHIP:DMG: }, + [1645778189.044435][4888:4893] CHIP:DMG: + [1645778189.044472][4888:4893] CHIP:DMG: StatusIB = + [1645778189.044519][4888:4893] CHIP:DMG: { + [1645778189.044558][4888:4893] CHIP:DMG: status = 0x0, + [1645778189.044603][4888:4893] CHIP:DMG: }, + [1645778189.044650][4888:4893] CHIP:DMG: + [1645778189.044686][4888:4893] CHIP:DMG: }, + [1645778189.044724][4888:4893] CHIP:DMG: + [1645778189.044754][4888:4893] CHIP:DMG: }, + [1645778189.044793][4888:4893] CHIP:DMG: + [1645778189.044821][4888:4893] CHIP:DMG: ], + [1645778189.044896][4888:4893] CHIP:DMG: + [1645778189.044925][4888:4893] CHIP:DMG: InteractionModelRevision = 1 + [1645778189.044954][4888:4893] CHIP:DMG: }, + [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x0 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml index 071af85a245de8..a47cfaa509625c 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml @@ -1,194 +1,194 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 78.3.3. [TC-MOD-3.3] OTA Mode Verification (DUT as Server) - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "TH reads the StartUpMode attribute from the DUT" - verification: | - ./chip-tool modeselect read start-up-mode 1 1 - [1645778279.692171][4898:4903] CHIP:DMG: ReportDataMessage = - [1645778279.692198][4898:4903] CHIP:DMG: { - [1645778279.692219][4898:4903] CHIP:DMG: AttributeReportIBs = - [1645778279.692254][4898:4903] CHIP:DMG: [ - [1645778279.692278][4898:4903] CHIP:DMG: AttributeReportIB = - [1645778279.692309][4898:4903] CHIP:DMG: { - [1645778279.692336][4898:4903] CHIP:DMG: AttributeDataIB = - [1645778279.692368][4898:4903] CHIP:DMG: { - [1645778279.692403][4898:4903] CHIP:DMG: DataVersion = 0xe164a61a, - [1645778279.692429][4898:4903] CHIP:DMG: AttributePathIB = - [1645778279.692462][4898:4903] CHIP:DMG: { - [1645778279.692494][4898:4903] CHIP:DMG: Endpoint = 0x1, - [1645778279.692533][4898:4903] CHIP:DMG: Cluster = 0x50, - [1645778279.692570][4898:4903] CHIP:DMG: Attribute = 0x0000_0003, - [1645778279.692601][4898:4903] CHIP:DMG: } - [1645778279.692635][4898:4903] CHIP:DMG: - [1645778279.692671][4898:4903] CHIP:DMG: Data = 0, - [1645778279.692703][4898:4903] CHIP:DMG: }, - [1645778279.692737][4898:4903] CHIP:DMG: - [1645778279.692764][4898:4903] CHIP:DMG: }, - [1645778279.692795][4898:4903] CHIP:DMG: - [1645778279.692818][4898:4903] CHIP:DMG: ], - [1645778279.692872][4898:4903] CHIP:DMG: - [1645778279.692897][4898:4903] CHIP:DMG: SuppressResponse = true, - [1645778279.692921][4898:4903] CHIP:DMG: InteractionModelRevision = 1 - [1645778279.692944][4898:4903] CHIP:DMG: } - [1645778279.693082][4898:4903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469722 - [1645778279.693151][4898:4903] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "TH reads the CurrentMode attribute from the DUT" - verification: | - ./chip-tool modeselect read current-mode 1 1 - [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage = - [1645778146.170407][4876:4881] CHIP:DMG: { - [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = - [1645778146.170482][4876:4881] CHIP:DMG: [ - [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = - [1645778146.170565][4876:4881] CHIP:DMG: { - [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = - [1645778146.170629][4876:4881] CHIP:DMG: { - [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, - [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = - [1645778146.170733][4876:4881] CHIP:DMG: { - [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, - [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, - [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, - [1645778146.170888][4876:4881] CHIP:DMG: } - [1645778146.170925][4876:4881] CHIP:DMG: - [1645778146.170988][4876:4881] CHIP:DMG: Data = 7, - [1645778146.171026][4876:4881] CHIP:DMG: }, - [1645778146.171060][4876:4881] CHIP:DMG: - [1645778146.171090][4876:4881] CHIP:DMG: }, - [1645778146.171129][4876:4881] CHIP:DMG: - [1645778146.171154][4876:4881] CHIP:DMG: ], - [1645778146.171196][4876:4881] CHIP:DMG: - [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, - [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 - [1645778146.171290][4876:4881] CHIP:DMG: } - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 7 - disabled: true - - - label: - "If the StartUpMode and CurrentMode attributes have the same value, - proceed to step 2c, Otherwise proceed to step 3a." - verification: | - - disabled: true - - - label: "DUT reads the SupportedModes attribute from the TH" - verification: | - ./chip-tool modeselect read supported-modes 1 1 - [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries - [1645776742.669546][4661:4666] CHIP:TOO: [1]: { - [1645776742.669588][4661:4666] CHIP:TOO: Label: Black - [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 - [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 - [1645776742.669661][4661:4666] CHIP:TOO: } - [1645776742.669692][4661:4666] CHIP:TOO: [2]: { - [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino - [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 - [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: 0 - [1645776742.669779][4661:4666] CHIP:TOO: } - [1645776742.669808][4661:4666] CHIP:TOO: [3]: { - [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso - [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 - [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 - [1645776742.669896][4661:4666] CHIP:TOO: } - disabled: true - - - label: - "Select a value from the list in step 2c with a different value than - the StartUpMode value read in step 1. TH sends a ChangeToMode command - to the TH with the selected value." - verification: | - ./chip-tool modeselect change-to-mode 4 1 1 - [1645778189.043893][4888:4893] CHIP:DMG: InvokeResponseMessage = - [1645778189.043924][4888:4893] CHIP:DMG: { - [1645778189.043953][4888:4893] CHIP:DMG: suppressResponse = false, - [1645778189.043986][4888:4893] CHIP:DMG: InvokeResponseIBs = - [1645778189.044027][4888:4893] CHIP:DMG: [ - [1645778189.044056][4888:4893] CHIP:DMG: InvokeResponseIB = - [1645778189.044100][4888:4893] CHIP:DMG: { - [1645778189.044132][4888:4893] CHIP:DMG: CommandStatusIB = - [1645778189.044171][4888:4893] CHIP:DMG: { - [1645778189.044203][4888:4893] CHIP:DMG: CommandPathIB = - [1645778189.044239][4888:4893] CHIP:DMG: { - [1645778189.044277][4888:4893] CHIP:DMG: EndpointId = 0x1, - [1645778189.044319][4888:4893] CHIP:DMG: ClusterId = 0x50, - [1645778189.044361][4888:4893] CHIP:DMG: CommandId = 0x0, - [1645778189.044394][4888:4893] CHIP:DMG: }, - [1645778189.044435][4888:4893] CHIP:DMG: - [1645778189.044472][4888:4893] CHIP:DMG: StatusIB = - [1645778189.044519][4888:4893] CHIP:DMG: { - [1645778189.044558][4888:4893] CHIP:DMG: status = 0x0, - [1645778189.044603][4888:4893] CHIP:DMG: }, - [1645778189.044650][4888:4893] CHIP:DMG: - [1645778189.044686][4888:4893] CHIP:DMG: }, - [1645778189.044724][4888:4893] CHIP:DMG: - [1645778189.044754][4888:4893] CHIP:DMG: }, - [1645778189.044793][4888:4893] CHIP:DMG: - [1645778189.044821][4888:4893] CHIP:DMG: ], - [1645778189.044896][4888:4893] CHIP:DMG: - [1645778189.044925][4888:4893] CHIP:DMG: InteractionModelRevision = 1 - [1645778189.044954][4888:4893] CHIP:DMG: }, - [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x0 - disabled: true - - - label: - "Perform an OTA update on the device that requires a reboot. Allow for - the DUT to update and fully reboot." - verification: | - - disabled: true - - - label: "TH reads the CurrentMode attribute from the DUT" - verification: | - ./chip-tool modeselect read current-mode 1 1 - [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage = - [1645778146.170407][4876:4881] CHIP:DMG: { - [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = - [1645778146.170482][4876:4881] CHIP:DMG: [ - [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = - [1645778146.170565][4876:4881] CHIP:DMG: { - [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = - [1645778146.170629][4876:4881] CHIP:DMG: { - [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, - [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = - [1645778146.170733][4876:4881] CHIP:DMG: { - [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, - [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, - [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, - [1645778146.170888][4876:4881] CHIP:DMG: } - [1645778146.170925][4876:4881] CHIP:DMG: - [1645778146.170988][4876:4881] CHIP:DMG: Data = 4, - [1645778146.171026][4876:4881] CHIP:DMG: }, - [1645778146.171060][4876:4881] CHIP:DMG: - [1645778146.171090][4876:4881] CHIP:DMG: }, - [1645778146.171129][4876:4881] CHIP:DMG: - [1645778146.171154][4876:4881] CHIP:DMG: ], - [1645778146.171196][4876:4881] CHIP:DMG: - [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, - [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 - [1645778146.171290][4876:4881] CHIP:DMG: } - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 4 - disabled: true +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 78.3.3. [TC-MOD-3.3] OTA Mode Verification (DUT as Server) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "TH reads the StartUpMode attribute from the DUT" + verification: | + ./chip-tool modeselect read start-up-mode 1 1 + [1645778279.692171][4898:4903] CHIP:DMG: ReportDataMessage = + [1645778279.692198][4898:4903] CHIP:DMG: { + [1645778279.692219][4898:4903] CHIP:DMG: AttributeReportIBs = + [1645778279.692254][4898:4903] CHIP:DMG: [ + [1645778279.692278][4898:4903] CHIP:DMG: AttributeReportIB = + [1645778279.692309][4898:4903] CHIP:DMG: { + [1645778279.692336][4898:4903] CHIP:DMG: AttributeDataIB = + [1645778279.692368][4898:4903] CHIP:DMG: { + [1645778279.692403][4898:4903] CHIP:DMG: DataVersion = 0xe164a61a, + [1645778279.692429][4898:4903] CHIP:DMG: AttributePathIB = + [1645778279.692462][4898:4903] CHIP:DMG: { + [1645778279.692494][4898:4903] CHIP:DMG: Endpoint = 0x1, + [1645778279.692533][4898:4903] CHIP:DMG: Cluster = 0x50, + [1645778279.692570][4898:4903] CHIP:DMG: Attribute = 0x0000_0003, + [1645778279.692601][4898:4903] CHIP:DMG: } + [1645778279.692635][4898:4903] CHIP:DMG: + [1645778279.692671][4898:4903] CHIP:DMG: Data = 0, + [1645778279.692703][4898:4903] CHIP:DMG: }, + [1645778279.692737][4898:4903] CHIP:DMG: + [1645778279.692764][4898:4903] CHIP:DMG: }, + [1645778279.692795][4898:4903] CHIP:DMG: + [1645778279.692818][4898:4903] CHIP:DMG: ], + [1645778279.692872][4898:4903] CHIP:DMG: + [1645778279.692897][4898:4903] CHIP:DMG: SuppressResponse = true, + [1645778279.692921][4898:4903] CHIP:DMG: InteractionModelRevision = 1 + [1645778279.692944][4898:4903] CHIP:DMG: } + [1645778279.693082][4898:4903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469722 + [1645778279.693151][4898:4903] CHIP:TOO: StartUpMode: 0 + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: | + ./chip-tool modeselect read current-mode 1 1 + [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage = + [1645778146.170407][4876:4881] CHIP:DMG: { + [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = + [1645778146.170482][4876:4881] CHIP:DMG: [ + [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = + [1645778146.170565][4876:4881] CHIP:DMG: { + [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = + [1645778146.170629][4876:4881] CHIP:DMG: { + [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, + [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = + [1645778146.170733][4876:4881] CHIP:DMG: { + [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, + [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, + [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, + [1645778146.170888][4876:4881] CHIP:DMG: } + [1645778146.170925][4876:4881] CHIP:DMG: + [1645778146.170988][4876:4881] CHIP:DMG: Data = 7, + [1645778146.171026][4876:4881] CHIP:DMG: }, + [1645778146.171060][4876:4881] CHIP:DMG: + [1645778146.171090][4876:4881] CHIP:DMG: }, + [1645778146.171129][4876:4881] CHIP:DMG: + [1645778146.171154][4876:4881] CHIP:DMG: ], + [1645778146.171196][4876:4881] CHIP:DMG: + [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, + [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 + [1645778146.171290][4876:4881] CHIP:DMG: } + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 7 + disabled: true + + - label: + "If the StartUpMode and CurrentMode attributes have the same value, + proceed to step 2c, Otherwise proceed to step 3a." + verification: | + + disabled: true + + - label: "DUT reads the SupportedModes attribute from the TH" + verification: | + ./chip-tool modeselect read supported-modes 1 1 + [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries + [1645776742.669546][4661:4666] CHIP:TOO: [1]: { + [1645776742.669588][4661:4666] CHIP:TOO: Label: Black + [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 + [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669661][4661:4666] CHIP:TOO: } + [1645776742.669692][4661:4666] CHIP:TOO: [2]: { + [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino + [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 + [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669779][4661:4666] CHIP:TOO: } + [1645776742.669808][4661:4666] CHIP:TOO: [3]: { + [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso + [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 + [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669896][4661:4666] CHIP:TOO: } + disabled: true + + - label: + "Select a value from the list in step 2c with a different value than + the StartUpMode value read in step 1. TH sends a ChangeToMode command + to the TH with the selected value." + verification: | + ./chip-tool modeselect change-to-mode 4 1 1 + [1645778189.043893][4888:4893] CHIP:DMG: InvokeResponseMessage = + [1645778189.043924][4888:4893] CHIP:DMG: { + [1645778189.043953][4888:4893] CHIP:DMG: suppressResponse = false, + [1645778189.043986][4888:4893] CHIP:DMG: InvokeResponseIBs = + [1645778189.044027][4888:4893] CHIP:DMG: [ + [1645778189.044056][4888:4893] CHIP:DMG: InvokeResponseIB = + [1645778189.044100][4888:4893] CHIP:DMG: { + [1645778189.044132][4888:4893] CHIP:DMG: CommandStatusIB = + [1645778189.044171][4888:4893] CHIP:DMG: { + [1645778189.044203][4888:4893] CHIP:DMG: CommandPathIB = + [1645778189.044239][4888:4893] CHIP:DMG: { + [1645778189.044277][4888:4893] CHIP:DMG: EndpointId = 0x1, + [1645778189.044319][4888:4893] CHIP:DMG: ClusterId = 0x50, + [1645778189.044361][4888:4893] CHIP:DMG: CommandId = 0x0, + [1645778189.044394][4888:4893] CHIP:DMG: }, + [1645778189.044435][4888:4893] CHIP:DMG: + [1645778189.044472][4888:4893] CHIP:DMG: StatusIB = + [1645778189.044519][4888:4893] CHIP:DMG: { + [1645778189.044558][4888:4893] CHIP:DMG: status = 0x0, + [1645778189.044603][4888:4893] CHIP:DMG: }, + [1645778189.044650][4888:4893] CHIP:DMG: + [1645778189.044686][4888:4893] CHIP:DMG: }, + [1645778189.044724][4888:4893] CHIP:DMG: + [1645778189.044754][4888:4893] CHIP:DMG: }, + [1645778189.044793][4888:4893] CHIP:DMG: + [1645778189.044821][4888:4893] CHIP:DMG: ], + [1645778189.044896][4888:4893] CHIP:DMG: + [1645778189.044925][4888:4893] CHIP:DMG: InteractionModelRevision = 1 + [1645778189.044954][4888:4893] CHIP:DMG: }, + [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x0 + disabled: true + + - label: + "Perform an OTA update on the device that requires a reboot. Allow for + the DUT to update and fully reboot." + verification: | + + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: | + ./chip-tool modeselect read current-mode 1 1 + [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage = + [1645778146.170407][4876:4881] CHIP:DMG: { + [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = + [1645778146.170482][4876:4881] CHIP:DMG: [ + [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = + [1645778146.170565][4876:4881] CHIP:DMG: { + [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = + [1645778146.170629][4876:4881] CHIP:DMG: { + [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, + [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = + [1645778146.170733][4876:4881] CHIP:DMG: { + [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, + [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, + [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, + [1645778146.170888][4876:4881] CHIP:DMG: } + [1645778146.170925][4876:4881] CHIP:DMG: + [1645778146.170988][4876:4881] CHIP:DMG: Data = 4, + [1645778146.171026][4876:4881] CHIP:DMG: }, + [1645778146.171060][4876:4881] CHIP:DMG: + [1645778146.171090][4876:4881] CHIP:DMG: }, + [1645778146.171129][4876:4881] CHIP:DMG: + [1645778146.171154][4876:4881] CHIP:DMG: ], + [1645778146.171196][4876:4881] CHIP:DMG: + [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, + [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 + [1645778146.171290][4876:4881] CHIP:DMG: } + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 4 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_NC_1_16.yaml b/src/app/tests/suites/certification/Test_TC_NC_1_16.yaml index d73fae1bf863e7..fb8d6d1b13e90e 100644 --- a/src/app/tests/suites/certification/Test_TC_NC_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_NC_1_16.yaml @@ -1,62 +1,62 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 3.16. [TC-NC-1.16] NetworkNotFound value as LastNetworkingstatus argument - validation for wifi interface [DUT-Commissionee] - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "TH1 sends ArmFailSafe command to the DUT" - verification: | - - disabled: true - - - label: - "TH1 sends RemoveNetwork Command to the DUT with NetworkID argument - value as 'Userwifi_ssid1' and Breadcrumb argument value as 0" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning remove-network GRLPrivate_EXT 0 1 0 - - [1646296227.059289][3118:3123] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 - [1646296227.059353][3118:3123] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 - [1646296227.059438][3118:3123] CHIP:TOO: NetworkConfigResponse: { - [1646296227.059487][3118:3123] CHIP:TOO: networkingStatus: 5 - [1646296227.059522][3118:3123] CHIP:TOO: debugText: - [1646296227.059556][3118:3123] CHIP:TOO: } - [1646296227.059598][3118:3123] CHIP:DMG: ICR moving to [AwaitingDe] - [1646296227.059667][3118:3123] CHIP:EM: Sending Standalone Ack for MessageCounter:15895540 on exchange 28900i - disabled: true - - - label: - "TH1 sends ConnectNetwork Command to the DUT with NetworkID value as - 'Userwifi_ssid1' and Breadcrumb value as 0" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning connect-network GRLPrivate_EXT 0 1 0 - - [1646297689.443117][3209:3214] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0007 - [1646297689.443168][3209:3214] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0007 - [1646297689.443244][3209:3214] CHIP:TOO: ConnectNetworkResponse: { - [1646297689.443286][3209:3214] CHIP:TOO: networkingStatus: 5 - [1646297689.443315][3209:3214] CHIP:TOO: debugText: - [1646297689.443342][3209:3214] CHIP:TOO: errorValue: 0 - [1646297689.443371][3209:3214] CHIP:TOO: } - [1646297689.443407][3209:3214] CHIP:DMG: ICR moving to [AwaitingDe] - [1646297689.443461][3209:3214] CHIP:EM: Sending Standalone Ack for MessageCounter:16011443 on exchange 34839i - disabled: true +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 3.16. [TC-NC-1.16] NetworkNotFound value as LastNetworkingstatus argument + validation for wifi interface [DUT-Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "TH1 sends ArmFailSafe command to the DUT" + verification: | + + disabled: true + + - label: + "TH1 sends RemoveNetwork Command to the DUT with NetworkID argument + value as 'Userwifi_ssid1' and Breadcrumb argument value as 0" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning remove-network GRLPrivate_EXT 0 1 0 + + [1646296227.059289][3118:3123] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 + [1646296227.059353][3118:3123] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 + [1646296227.059438][3118:3123] CHIP:TOO: NetworkConfigResponse: { + [1646296227.059487][3118:3123] CHIP:TOO: networkingStatus: 5 + [1646296227.059522][3118:3123] CHIP:TOO: debugText: + [1646296227.059556][3118:3123] CHIP:TOO: } + [1646296227.059598][3118:3123] CHIP:DMG: ICR moving to [AwaitingDe] + [1646296227.059667][3118:3123] CHIP:EM: Sending Standalone Ack for MessageCounter:15895540 on exchange 28900i + disabled: true + + - label: + "TH1 sends ConnectNetwork Command to the DUT with NetworkID value as + 'Userwifi_ssid1' and Breadcrumb value as 0" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning connect-network GRLPrivate_EXT 0 1 0 + + [1646297689.443117][3209:3214] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0007 + [1646297689.443168][3209:3214] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0007 + [1646297689.443244][3209:3214] CHIP:TOO: ConnectNetworkResponse: { + [1646297689.443286][3209:3214] CHIP:TOO: networkingStatus: 5 + [1646297689.443315][3209:3214] CHIP:TOO: debugText: + [1646297689.443342][3209:3214] CHIP:TOO: errorValue: 0 + [1646297689.443371][3209:3214] CHIP:TOO: } + [1646297689.443407][3209:3214] CHIP:DMG: ICR moving to [AwaitingDe] + [1646297689.443461][3209:3214] CHIP:EM: Sending Standalone Ack for MessageCounter:16011443 on exchange 34839i + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_NC_1_3.yaml b/src/app/tests/suites/certification/Test_TC_NC_1_3.yaml index e795ab40dcdb89..d0f28e4c940209 100644 --- a/src/app/tests/suites/certification/Test_TC_NC_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_NC_1_3.yaml @@ -1,184 +1,184 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 3.3. [TC-NC-1.3] Verification on Ethernet connection and attributes check - [DUT - Commissionee] - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "Factory reset the DUT" - verification: | - - disabled: true - - - label: "TH1 is commissioned with DUT" - verification: | - - disabled: true - - - label: - "TH1 reads Descriptor Cluster from the DUT with EP0 TH1 reads - ServerList from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool descriptor read server-list 1 0 - - - [1646226258.250313][2446:2451] CHIP:DMG: SuppressResponse = true, - [1646226258.250337][2446:2451] CHIP:DMG: InteractionModelRevision = 1 - [1646226258.250359][2446:2451] CHIP:DMG: } - [1646226258.252027][2446:2451] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001DataVersion: 3582931896 - [1646226258.252128][2446:2451] CHIP:TOO: server list: 25 entries - [1646226258.252183][2446:2451] CHIP:TOO: [1]: 3 - [1646226258.252208][2446:2451] CHIP:TOO: [2]: 4 - [1646226258.252232][2446:2451] CHIP:TOO: [3]: 29 - [1646226258.252256][2446:2451] CHIP:TOO: [4]: 30 - [1646226258.252280][2446:2451] CHIP:TOO: [5]: 31 - [1646226258.252303][2446:2451] CHIP:TOO: [6]: 40 - [1646226258.252326][2446:2451] CHIP:TOO: [7]: 42 - [1646226258.252349][2446:2451] CHIP:TOO: [8]: 43 - [1646226258.252373][2446:2451] CHIP:TOO: [9]: 44 - [1646226258.252396][2446:2451] CHIP:TOO: [10]: 45 - [1646226258.252420][2446:2451] CHIP:TOO: [11]: 46 - [1646226258.252443][2446:2451] CHIP:TOO: [12]: 48 - [1646226258.252466][2446:2451] CHIP:TOO: [13]: 49 - [1646226258.252489][2446:2451] CHIP:TOO: [14]: 50 - [1646226258.252512][2446:2451] CHIP:TOO: [15]: 51 - [1646226258.252536][2446:2451] CHIP:TOO: [16]: 52 - [1646226258.252559][2446:2451] CHIP:TOO: [17]: 53 - [1646226258.252582][2446:2451] CHIP:TOO: [18]: 54 - [1646226258.252605][2446:2451] CHIP:TOO: [19]: 55 - [1646226258.252629][2446:2451] CHIP:TOO: [20]: 60 - [1646226258.252652][2446:2451] CHIP:TOO: [21]: 62 - [1646226258.252675][2446:2451] CHIP:TOO: [22]: 63 - [1646226258.252698][2446:2451] CHIP:TOO: [23]: 64 - [1646226258.252721][2446:2451] CHIP:TOO: [24]: 65 - [1646226258.252745][2446:2451] CHIP:TOO: [25]: 1029 - [1646226258.255517][2446:2451] CHIP:EM: Sending Standalone Ack for MessageCounter:10627940 on exchange 21443i - disabled: true - - - label: "TH1 reads FeatureMap attribute from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read feature-map 1 0 - - [1646226326.733918][2460:2465] CHIP:DMG: - [1646226326.733950][2460:2465] CHIP:DMG: SuppressResponse = true, - [1646226326.733984][2460:2465] CHIP:DMG: InteractionModelRevision = 1 - [1646226326.734014][2460:2465] CHIP:DMG: } - [1646226326.734188][2460:2465] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFCDataVersion: 3622667250 - [1646226326.736250][2460:2465] CHIP:TOO: FeatureMap: 2 - [1646226326.736362][2460:2465] CHIP:EM: Sending Standalone Ack for MessageCounter:9135736 on exchange 51231i - disabled: true - - - label: "TH1 reads the MaxNetworks attribute from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read max-networks 1 0 - - [1646226441.815782][2475:2480] CHIP:DMG: SuppressResponse = true, - [1646226441.815849][2475:2480] CHIP:DMG: InteractionModelRevision = 1 - [1646226441.815889][2475:2480] CHIP:DMG: } - [1646226441.816092][2475:2480] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000DataVersion: 3622667250 - [1646226441.816191][2475:2480] CHIP:TOO: MaxNetworks: 1 - [1646226441.816288][2475:2480] CHIP:EM: Sending Standalone Ack for MessageCounter:14864333 on exchange 39473i - disabled: true - - - label: "TH1 reads the Networks attribute list from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read networks 1 0 - - [1646226488.740009][2488:2493] CHIP:DMG: - [1646226488.740041][2488:2493] CHIP:DMG: SuppressResponse = true, - [1646226488.740074][2488:2493] CHIP:DMG: InteractionModelRevision = 1 - [1646226488.740113][2488:2493] CHIP:DMG: } - [1646226488.740320][2488:2493] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001DataVersion: 3622667250 - [1646226488.740409][2488:2493] CHIP:TOO: Networks: 0 entries - [1646226488.740501][2488:2493] CHIP:EM: Sending Standalone Ack for MessageCounter:9725190 on exchange 29852i - disabled: true - - - label: "TH1 reads InterfaceEnabled attribute from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read interface-enabled 1 0 - - [1646226615.428003][2502:2507] CHIP:DMG: - [1646226615.428035][2502:2507] CHIP:DMG: SuppressResponse = true, - [1646226615.428064][2502:2507] CHIP:DMG: InteractionModelRevision = 1 - [1646226615.428094][2502:2507] CHIP:DMG: } - [1646226615.428270][2502:2507] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0004DataVersion: 3622667250 - [1646226615.428331][2502:2507] CHIP:TOO: InterfaceEnabled: TRUE - [1646226615.428415][2502:2507] CHIP:EM: Sending Standalone Ack for MessageCounter:3894401 on exchange 55691i - disabled: true - - - label: "TH1 reads LastNetworkingStatus attribute from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read last-networking-status 1 0 - - [1646227167.614060][2533:2538] CHIP:DMG: SuppressResponse = true, - [1646227167.614095][2533:2538] CHIP:DMG: InteractionModelRevision = 1 - [1646227167.614126][2533:2538] CHIP:DMG: } - [1646227167.614299][2533:2538] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0005DataVersion: 3622667250 - [1646227167.614385][2533:2538] CHIP:TOO: LastNetworkingStatus: 0 - [1646227167.614468][2533:2538] CHIP:EM: Sending Standalone Ack for MessageCounter:8947540 on exchange 12532i - disabled: true - - - label: - "TH1 reads the LastNetworkID attribute from the DUT TH1 reads the - Networks attribute from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read last-network-id 1 0 - - [1646227218.543427][2545:2550] CHIP:DMG: - [1646227218.543462][2545:2550] CHIP:DMG: SuppressResponse = true, - [1646227218.543506][2545:2550] CHIP:DMG: InteractionModelRevision = 1 - [1646227218.543538][2545:2550] CHIP:DMG: } - [1646227218.543748][2545:2550] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0006DataVersion: 3622667250 - [1646227218.543836][2545:2550] CHIP:TOO: LastNetworkID: - [1646227218.543924][2545:2550] CHIP:EM: Sending Standalone Ack for MessageCounter:9758721 on exchange 15256i - disabled: true - - - label: "TH1 reads the LastConnectErrorValue attribute from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read last-connect-error-value 1 0 - - [1646227266.753206][2560:2565] CHIP:DMG: - [1646227266.753239][2560:2565] CHIP:DMG: SuppressResponse = true, - [1646227266.753272][2560:2565] CHIP:DMG: InteractionModelRevision = 1 - [1646227266.753303][2560:2565] CHIP:DMG: } - [1646227266.753472][2560:2565] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0007DataVersion: 3622667250 - [1646227266.753556][2560:2565] CHIP:TOO: LastConnectErrorValue: 0 - [1646227266.753632][2560:2565] CHIP:EM: Sending Standalone Ack for MessageCounter:7911198 on exchange 43970i - disabled: true - - - label: "TH1 reads ClientGeneratedCommandList attribute from the DUT" - verification: | - ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read client-generated-command-list 1 0 - - [1646227303.224981][2570:2575] CHIP:DMG: SuppressResponse = true, - [1646227303.225017][2570:2575] CHIP:DMG: InteractionModelRevision = 1 - [1646227303.225050][2570:2575] CHIP:DMG: } - [1646227303.225902][2570:2575] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF9DataVersion: 3622667250 - [1646227303.226014][2570:2575] CHIP:TOO: ClientGeneratedCommandList: 7 entries - [1646227303.226093][2570:2575] CHIP:TOO: [1]: 0 - [1646227303.226131][2570:2575] CHIP:TOO: [2]: 2 - [1646227303.226167][2570:2575] CHIP:TOO: [3]: 3 - [1646227303.226195][2570:2575] CHIP:TOO: [4]: 4 - [1646227303.226223][2570:2575] CHIP:TOO: [5]: 5 - [1646227303.226251][2570:2575] CHIP:TOO: [6]: 6 - [1646227303.226333][2570:2575] CHIP:TOO: [7]: 8 - [1646227303.226419][2570:2575] CHIP:EM: Sending Standalone Ack for MessageCounter:15891447 on exchange 61063i - disabled: true +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: + 3.3. [TC-NC-1.3] Verification on Ethernet connection and attributes check + [DUT - Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Factory reset the DUT" + verification: | + + disabled: true + + - label: "TH1 is commissioned with DUT" + verification: | + + disabled: true + + - label: + "TH1 reads Descriptor Cluster from the DUT with EP0 TH1 reads + ServerList from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool descriptor read server-list 1 0 + + + [1646226258.250313][2446:2451] CHIP:DMG: SuppressResponse = true, + [1646226258.250337][2446:2451] CHIP:DMG: InteractionModelRevision = 1 + [1646226258.250359][2446:2451] CHIP:DMG: } + [1646226258.252027][2446:2451] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0001DataVersion: 3582931896 + [1646226258.252128][2446:2451] CHIP:TOO: server list: 25 entries + [1646226258.252183][2446:2451] CHIP:TOO: [1]: 3 + [1646226258.252208][2446:2451] CHIP:TOO: [2]: 4 + [1646226258.252232][2446:2451] CHIP:TOO: [3]: 29 + [1646226258.252256][2446:2451] CHIP:TOO: [4]: 30 + [1646226258.252280][2446:2451] CHIP:TOO: [5]: 31 + [1646226258.252303][2446:2451] CHIP:TOO: [6]: 40 + [1646226258.252326][2446:2451] CHIP:TOO: [7]: 42 + [1646226258.252349][2446:2451] CHIP:TOO: [8]: 43 + [1646226258.252373][2446:2451] CHIP:TOO: [9]: 44 + [1646226258.252396][2446:2451] CHIP:TOO: [10]: 45 + [1646226258.252420][2446:2451] CHIP:TOO: [11]: 46 + [1646226258.252443][2446:2451] CHIP:TOO: [12]: 48 + [1646226258.252466][2446:2451] CHIP:TOO: [13]: 49 + [1646226258.252489][2446:2451] CHIP:TOO: [14]: 50 + [1646226258.252512][2446:2451] CHIP:TOO: [15]: 51 + [1646226258.252536][2446:2451] CHIP:TOO: [16]: 52 + [1646226258.252559][2446:2451] CHIP:TOO: [17]: 53 + [1646226258.252582][2446:2451] CHIP:TOO: [18]: 54 + [1646226258.252605][2446:2451] CHIP:TOO: [19]: 55 + [1646226258.252629][2446:2451] CHIP:TOO: [20]: 60 + [1646226258.252652][2446:2451] CHIP:TOO: [21]: 62 + [1646226258.252675][2446:2451] CHIP:TOO: [22]: 63 + [1646226258.252698][2446:2451] CHIP:TOO: [23]: 64 + [1646226258.252721][2446:2451] CHIP:TOO: [24]: 65 + [1646226258.252745][2446:2451] CHIP:TOO: [25]: 1029 + [1646226258.255517][2446:2451] CHIP:EM: Sending Standalone Ack for MessageCounter:10627940 on exchange 21443i + disabled: true + + - label: "TH1 reads FeatureMap attribute from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read feature-map 1 0 + + [1646226326.733918][2460:2465] CHIP:DMG: + [1646226326.733950][2460:2465] CHIP:DMG: SuppressResponse = true, + [1646226326.733984][2460:2465] CHIP:DMG: InteractionModelRevision = 1 + [1646226326.734014][2460:2465] CHIP:DMG: } + [1646226326.734188][2460:2465] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFFCDataVersion: 3622667250 + [1646226326.736250][2460:2465] CHIP:TOO: FeatureMap: 2 + [1646226326.736362][2460:2465] CHIP:EM: Sending Standalone Ack for MessageCounter:9135736 on exchange 51231i + disabled: true + + - label: "TH1 reads the MaxNetworks attribute from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read max-networks 1 0 + + [1646226441.815782][2475:2480] CHIP:DMG: SuppressResponse = true, + [1646226441.815849][2475:2480] CHIP:DMG: InteractionModelRevision = 1 + [1646226441.815889][2475:2480] CHIP:DMG: } + [1646226441.816092][2475:2480] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0000DataVersion: 3622667250 + [1646226441.816191][2475:2480] CHIP:TOO: MaxNetworks: 1 + [1646226441.816288][2475:2480] CHIP:EM: Sending Standalone Ack for MessageCounter:14864333 on exchange 39473i + disabled: true + + - label: "TH1 reads the Networks attribute list from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read networks 1 0 + + [1646226488.740009][2488:2493] CHIP:DMG: + [1646226488.740041][2488:2493] CHIP:DMG: SuppressResponse = true, + [1646226488.740074][2488:2493] CHIP:DMG: InteractionModelRevision = 1 + [1646226488.740113][2488:2493] CHIP:DMG: } + [1646226488.740320][2488:2493] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001DataVersion: 3622667250 + [1646226488.740409][2488:2493] CHIP:TOO: Networks: 0 entries + [1646226488.740501][2488:2493] CHIP:EM: Sending Standalone Ack for MessageCounter:9725190 on exchange 29852i + disabled: true + + - label: "TH1 reads InterfaceEnabled attribute from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read interface-enabled 1 0 + + [1646226615.428003][2502:2507] CHIP:DMG: + [1646226615.428035][2502:2507] CHIP:DMG: SuppressResponse = true, + [1646226615.428064][2502:2507] CHIP:DMG: InteractionModelRevision = 1 + [1646226615.428094][2502:2507] CHIP:DMG: } + [1646226615.428270][2502:2507] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0004DataVersion: 3622667250 + [1646226615.428331][2502:2507] CHIP:TOO: InterfaceEnabled: TRUE + [1646226615.428415][2502:2507] CHIP:EM: Sending Standalone Ack for MessageCounter:3894401 on exchange 55691i + disabled: true + + - label: "TH1 reads LastNetworkingStatus attribute from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read last-networking-status 1 0 + + [1646227167.614060][2533:2538] CHIP:DMG: SuppressResponse = true, + [1646227167.614095][2533:2538] CHIP:DMG: InteractionModelRevision = 1 + [1646227167.614126][2533:2538] CHIP:DMG: } + [1646227167.614299][2533:2538] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0005DataVersion: 3622667250 + [1646227167.614385][2533:2538] CHIP:TOO: LastNetworkingStatus: 0 + [1646227167.614468][2533:2538] CHIP:EM: Sending Standalone Ack for MessageCounter:8947540 on exchange 12532i + disabled: true + + - label: + "TH1 reads the LastNetworkID attribute from the DUT TH1 reads the + Networks attribute from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read last-network-id 1 0 + + [1646227218.543427][2545:2550] CHIP:DMG: + [1646227218.543462][2545:2550] CHIP:DMG: SuppressResponse = true, + [1646227218.543506][2545:2550] CHIP:DMG: InteractionModelRevision = 1 + [1646227218.543538][2545:2550] CHIP:DMG: } + [1646227218.543748][2545:2550] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0006DataVersion: 3622667250 + [1646227218.543836][2545:2550] CHIP:TOO: LastNetworkID: + [1646227218.543924][2545:2550] CHIP:EM: Sending Standalone Ack for MessageCounter:9758721 on exchange 15256i + disabled: true + + - label: "TH1 reads the LastConnectErrorValue attribute from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read last-connect-error-value 1 0 + + [1646227266.753206][2560:2565] CHIP:DMG: + [1646227266.753239][2560:2565] CHIP:DMG: SuppressResponse = true, + [1646227266.753272][2560:2565] CHIP:DMG: InteractionModelRevision = 1 + [1646227266.753303][2560:2565] CHIP:DMG: } + [1646227266.753472][2560:2565] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0007DataVersion: 3622667250 + [1646227266.753556][2560:2565] CHIP:TOO: LastConnectErrorValue: 0 + [1646227266.753632][2560:2565] CHIP:EM: Sending Standalone Ack for MessageCounter:7911198 on exchange 43970i + disabled: true + + - label: "TH1 reads ClientGeneratedCommandList attribute from the DUT" + verification: | + ubuntu@ubuntu:~/apps$ sudo ./chip-tool networkcommissioning read client-generated-command-list 1 0 + + [1646227303.224981][2570:2575] CHIP:DMG: SuppressResponse = true, + [1646227303.225017][2570:2575] CHIP:DMG: InteractionModelRevision = 1 + [1646227303.225050][2570:2575] CHIP:DMG: } + [1646227303.225902][2570:2575] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_FFF9DataVersion: 3622667250 + [1646227303.226014][2570:2575] CHIP:TOO: ClientGeneratedCommandList: 7 entries + [1646227303.226093][2570:2575] CHIP:TOO: [1]: 0 + [1646227303.226131][2570:2575] CHIP:TOO: [2]: 2 + [1646227303.226167][2570:2575] CHIP:TOO: [3]: 3 + [1646227303.226195][2570:2575] CHIP:TOO: [4]: 4 + [1646227303.226223][2570:2575] CHIP:TOO: [5]: 5 + [1646227303.226251][2570:2575] CHIP:TOO: [6]: 6 + [1646227303.226333][2570:2575] CHIP:TOO: [7]: 8 + [1646227303.226419][2570:2575] CHIP:EM: Sending Standalone Ack for MessageCounter:15891447 on exchange 61063i + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml index 8bcf66322954ed..5cedecfdb99390 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_3_2.yaml @@ -1,78 +1,78 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 3.2.6. [TC-OCC-3.2] Primary functionality with client as DUT - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "Commission TH to DUT" - verification: | - - disabled: true - - - label: "DUT reads Occupancy attribute from TH" - verification: | - ./chip-tool occupancysensing read occupancy 1 1 - - [1646207231.401268][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646207231.401302][2190:2190] CHIP:DMG: { - [1646207231.401330][2190:2190] CHIP:DMG: AttributePathIBs = - [1646207231.401370][2190:2190] CHIP:DMG: [ - [1646207231.401402][2190:2190] CHIP:DMG: AttributePathIB = - [1646207231.401459][2190:2190] CHIP:DMG: { - [1646207231.401514][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646207231.401554][2190:2190] CHIP:DMG: Cluster = 0x406, - [1646207231.401597][2190:2190] CHIP:DMG: Attribute = 0x0000_0000, - [1646207231.401635][2190:2190] CHIP:DMG: } - [1646207231.401672][2190:2190] CHIP:DMG: - [1646207231.401705][2190:2190] CHIP:DMG: ], - [1646207231.401739][2190:2190] CHIP:DMG: - [1646207231.401771][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646207231.401803][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646207231.401832][2190:2190] CHIP:DMG: }, - [1646207231.401908][2190:2190] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true - - - label: "Operate on TH to change the occupancy status" - verification: | - Logs will be device specific - disabled: true - - - label: "after a few seconds, DUT reads Occupancy attribute from TH" - verification: | - ./chip-tool occupancysensing read occupancy 1 1 - - [1646207231.401268][2190:2190] CHIP:DMG: ReadRequestMessage = - [1646207231.401302][2190:2190] CHIP:DMG: { - [1646207231.401330][2190:2190] CHIP:DMG: AttributePathIBs = - [1646207231.401370][2190:2190] CHIP:DMG: [ - [1646207231.401402][2190:2190] CHIP:DMG: AttributePathIB = - [1646207231.401459][2190:2190] CHIP:DMG: { - [1646207231.401514][2190:2190] CHIP:DMG: Endpoint = 0x1, - [1646207231.401554][2190:2190] CHIP:DMG: Cluster = 0x406, - [1646207231.401597][2190:2190] CHIP:DMG: Attribute = 0x0000_0000, - [1646207231.401635][2190:2190] CHIP:DMG: } - [1646207231.401672][2190:2190] CHIP:DMG: - [1646207231.401705][2190:2190] CHIP:DMG: ], - [1646207231.401739][2190:2190] CHIP:DMG: - [1646207231.401771][2190:2190] CHIP:DMG: isFabricFiltered = false, - [1646207231.401803][2190:2190] CHIP:DMG: InteractionModelRevision = 1 - [1646207231.401832][2190:2190] CHIP:DMG: }, - [1646207231.401908][2190:2190] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true +# 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. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 3.2.6. [TC-OCC-3.2] Primary functionality with client as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission TH to DUT" + verification: | + + disabled: true + + - label: "DUT reads Occupancy attribute from TH" + verification: | + ./chip-tool occupancysensing read occupancy 1 1 + + [1646207231.401268][2190:2190] CHIP:DMG: ReadRequestMessage = + [1646207231.401302][2190:2190] CHIP:DMG: { + [1646207231.401330][2190:2190] CHIP:DMG: AttributePathIBs = + [1646207231.401370][2190:2190] CHIP:DMG: [ + [1646207231.401402][2190:2190] CHIP:DMG: AttributePathIB = + [1646207231.401459][2190:2190] CHIP:DMG: { + [1646207231.401514][2190:2190] CHIP:DMG: Endpoint = 0x1, + [1646207231.401554][2190:2190] CHIP:DMG: Cluster = 0x406, + [1646207231.401597][2190:2190] CHIP:DMG: Attribute = 0x0000_0000, + [1646207231.401635][2190:2190] CHIP:DMG: } + [1646207231.401672][2190:2190] CHIP:DMG: + [1646207231.401705][2190:2190] CHIP:DMG: ], + [1646207231.401739][2190:2190] CHIP:DMG: + [1646207231.401771][2190:2190] CHIP:DMG: isFabricFiltered = false, + [1646207231.401803][2190:2190] CHIP:DMG: InteractionModelRevision = 1 + [1646207231.401832][2190:2190] CHIP:DMG: }, + [1646207231.401908][2190:2190] CHIP:DMG: IM RH moving to [GeneratingReports] + disabled: true + + - label: "Operate on TH to change the occupancy status" + verification: | + Logs will be device specific + disabled: true + + - label: "after a few seconds, DUT reads Occupancy attribute from TH" + verification: | + ./chip-tool occupancysensing read occupancy 1 1 + + [1646207231.401268][2190:2190] CHIP:DMG: ReadRequestMessage = + [1646207231.401302][2190:2190] CHIP:DMG: { + [1646207231.401330][2190:2190] CHIP:DMG: AttributePathIBs = + [1646207231.401370][2190:2190] CHIP:DMG: [ + [1646207231.401402][2190:2190] CHIP:DMG: AttributePathIB = + [1646207231.401459][2190:2190] CHIP:DMG: { + [1646207231.401514][2190:2190] CHIP:DMG: Endpoint = 0x1, + [1646207231.401554][2190:2190] CHIP:DMG: Cluster = 0x406, + [1646207231.401597][2190:2190] CHIP:DMG: Attribute = 0x0000_0000, + [1646207231.401635][2190:2190] CHIP:DMG: } + [1646207231.401672][2190:2190] CHIP:DMG: + [1646207231.401705][2190:2190] CHIP:DMG: ], + [1646207231.401739][2190:2190] CHIP:DMG: + [1646207231.401771][2190:2190] CHIP:DMG: isFabricFiltered = false, + [1646207231.401803][2190:2190] CHIP:DMG: InteractionModelRevision = 1 + [1646207231.401832][2190:2190] CHIP:DMG: }, + [1646207231.401908][2190:2190] CHIP:DMG: IM RH moving to [GeneratingReports] + disabled: true diff --git a/src/platform/P6/app_platform_cfg.c b/src/platform/P6/app_platform_cfg.c index d4c9c66110bf8c..7068cb58166818 100644 --- a/src/platform/P6/app_platform_cfg.c +++ b/src/platform/P6/app_platform_cfg.c @@ -1,99 +1,99 @@ -/******************************************************************************* - * (c) 2020, Cypress Semiconductor Corporation. All rights reserved. - ******************************************************************************* - * This software, including source code, documentation and related materials - * ("Software"), is owned by Cypress Semiconductor Corporation or one of its - * subsidiaries ("Cypress") and is protected by and subject to worldwide patent - * protection (United States and foreign), United States copyright laws and - * international treaty provisions. Therefore, you may use this Software only - * as provided in the license agreement accompanying the software package from - * which you obtained this Software ("EULA"). - * - * If no EULA applies, Cypress hereby grants you a personal, non-exclusive, - * non-transferable license to copy, modify, and compile the Software source - * code solely for use in connection with Cypress's integrated circuit products. - * Any reproduction, modification, translation, compilation, or representation - * of this Software except as specified above is prohibited without the express - * written permission of Cypress. - * - * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress - * reserves the right to make changes to the Software without notice. Cypress - * does not assume any liability arising out of the application or use of the - * Software or any product or circuit described in the Software. Cypress does - * not authorize its products for use in any products where a malfunction or - * failure of the Cypress product may reasonably be expected to result in - * significant property damage, injury or death ("High Risk Product"). By - * including Cypress's product in a High Risk Product, the manufacturer of such - * system or application assumes all risk of such use and in doing so agrees to - * indemnify Cypress against all liability. - *******************************************************************************/ - -/******************************************************************************* - * File Name: app_platform_cfg.c - * Version: 1.0 - * - * Description: - * Runtime Bluetooth stack configuration parameters - * - *******************************************************************************/ -#include "app_platform_cfg.h" -#include "wiced_bt_dev.h" - -const cybt_platform_config_t bt_platform_cfg_settings = -{ - .hci_config = - { - .hci_transport = CYBT_HCI_UART, - - .hci = - { - .hci_uart = - { - .uart_tx_pin = CYBSP_BT_UART_TX, - .uart_rx_pin = CYBSP_BT_UART_RX, - .uart_rts_pin = CYBSP_BT_UART_RTS, - .uart_cts_pin = CYBSP_BT_UART_CTS, - - .baud_rate_for_fw_download = 3000000, - .baud_rate_for_feature = 115200, - - .data_bits = 8, - .stop_bits = 1, - .parity = CYHAL_UART_PARITY_NONE, - .flow_control = WICED_TRUE - } - } - }, - - .controller_config = - { - .bt_power_pin = CYBSP_BT_POWER, - .sleep_mode = - { -#if (bt_0_power_0_ENABLED == 1) -#if (CYCFG_BT_LP_ENABLED == 1) - .sleep_mode_enabled = CYCFG_BT_LP_ENABLED, - .device_wakeup_pin = CYCFG_BT_DEV_WAKE_GPIO, - .host_wakeup_pin = CYCFG_BT_HOST_WAKE_GPIO, - .device_wake_polarity = CYCFG_BT_DEV_WAKE_POLARITY, - .host_wake_polarity = CYCFG_BT_HOST_WAKE_IRQ_EVENT - -#else - .sleep_mode_enabled = WICED_FALSE -#endif -#else - .sleep_mode_enabled = WICED_TRUE, - .device_wakeup_pin = CYBSP_BT_DEVICE_WAKE, - .host_wakeup_pin = CYBSP_BT_HOST_WAKE, - .device_wake_polarity = CYBT_WAKE_ACTIVE_LOW, - .host_wake_polarity = CYBT_WAKE_ACTIVE_LOW -#endif - } - }, - - .task_mem_pool_size = 2048 -}; - -/* [] END OF FILE */ +/******************************************************************************* + * (c) 2020, Cypress Semiconductor Corporation. All rights reserved. + ******************************************************************************* + * This software, including source code, documentation and related materials + * ("Software"), is owned by Cypress Semiconductor Corporation or one of its + * subsidiaries ("Cypress") and is protected by and subject to worldwide patent + * protection (United States and foreign), United States copyright laws and + * international treaty provisions. Therefore, you may use this Software only + * as provided in the license agreement accompanying the software package from + * which you obtained this Software ("EULA"). + * + * If no EULA applies, Cypress hereby grants you a personal, non-exclusive, + * non-transferable license to copy, modify, and compile the Software source + * code solely for use in connection with Cypress's integrated circuit products. + * Any reproduction, modification, translation, compilation, or representation + * of this Software except as specified above is prohibited without the express + * written permission of Cypress. + * + * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress + * reserves the right to make changes to the Software without notice. Cypress + * does not assume any liability arising out of the application or use of the + * Software or any product or circuit described in the Software. Cypress does + * not authorize its products for use in any products where a malfunction or + * failure of the Cypress product may reasonably be expected to result in + * significant property damage, injury or death ("High Risk Product"). By + * including Cypress's product in a High Risk Product, the manufacturer of such + * system or application assumes all risk of such use and in doing so agrees to + * indemnify Cypress against all liability. + *******************************************************************************/ + +/******************************************************************************* + * File Name: app_platform_cfg.c + * Version: 1.0 + * + * Description: + * Runtime Bluetooth stack configuration parameters + * + *******************************************************************************/ +#include "app_platform_cfg.h" +#include "wiced_bt_dev.h" + +const cybt_platform_config_t bt_platform_cfg_settings = +{ + .hci_config = + { + .hci_transport = CYBT_HCI_UART, + + .hci = + { + .hci_uart = + { + .uart_tx_pin = CYBSP_BT_UART_TX, + .uart_rx_pin = CYBSP_BT_UART_RX, + .uart_rts_pin = CYBSP_BT_UART_RTS, + .uart_cts_pin = CYBSP_BT_UART_CTS, + + .baud_rate_for_fw_download = 3000000, + .baud_rate_for_feature = 115200, + + .data_bits = 8, + .stop_bits = 1, + .parity = CYHAL_UART_PARITY_NONE, + .flow_control = WICED_TRUE + } + } + }, + + .controller_config = + { + .bt_power_pin = CYBSP_BT_POWER, + .sleep_mode = + { +#if (bt_0_power_0_ENABLED == 1) +#if (CYCFG_BT_LP_ENABLED == 1) + .sleep_mode_enabled = CYCFG_BT_LP_ENABLED, + .device_wakeup_pin = CYCFG_BT_DEV_WAKE_GPIO, + .host_wakeup_pin = CYCFG_BT_HOST_WAKE_GPIO, + .device_wake_polarity = CYCFG_BT_DEV_WAKE_POLARITY, + .host_wake_polarity = CYCFG_BT_HOST_WAKE_IRQ_EVENT + +#else + .sleep_mode_enabled = WICED_FALSE +#endif +#else + .sleep_mode_enabled = WICED_TRUE, + .device_wakeup_pin = CYBSP_BT_DEVICE_WAKE, + .host_wakeup_pin = CYBSP_BT_HOST_WAKE, + .device_wake_polarity = CYBT_WAKE_ACTIVE_LOW, + .host_wake_polarity = CYBT_WAKE_ACTIVE_LOW +#endif + } + }, + + .task_mem_pool_size = 2048 +}; + +/* [] END OF FILE */ diff --git a/src/platform/P6/app_platform_cfg.h b/src/platform/P6/app_platform_cfg.h index 41111e5e312010..1764cc3fcc08dc 100644 --- a/src/platform/P6/app_platform_cfg.h +++ b/src/platform/P6/app_platform_cfg.h @@ -1,52 +1,52 @@ -/******************************************************************************* - * (c) 2020, Cypress Semiconductor Corporation. All rights reserved. - ******************************************************************************* - * This software, including source code, documentation and related materials - * ("Software"), is owned by Cypress Semiconductor Corporation or one of its - * subsidiaries ("Cypress") and is protected by and subject to worldwide patent - * protection (United States and foreign), United States copyright laws and - * international treaty provisions. Therefore, you may use this Software only - * as provided in the license agreement accompanying the software package from - * which you obtained this Software ("EULA"). - * - * If no EULA applies, Cypress hereby grants you a personal, non-exclusive, - * non-transferable license to copy, modify, and compile the Software source - * code solely for use in connection with Cypress's integrated circuit products. - * Any reproduction, modification, translation, compilation, or representation - * of this Software except as specified above is prohibited without the express - * written permission of Cypress. - * - * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress - * reserves the right to make changes to the Software without notice. Cypress - * does not assume any liability arising out of the application or use of the - * Software or any product or circuit described in the Software. Cypress does - * not authorize its products for use in any products where a malfunction or - * failure of the Cypress product may reasonably be expected to result in - * significant property damage, injury or death ("High Risk Product"). By - * including Cypress's product in a High Risk Product, the manufacturer of such - * system or application assumes all risk of such use and in doing so agrees to - * indemnify Cypress against all liability. - *******************************************************************************/ - -/******************************************************************************* - * File Name: app_platform_cfg.h - * Version: 1.0 - * - * Description: - * Header file for runtime Bluetooth stack configuration parameters - * - *******************************************************************************/ - -#ifndef APP_PLATFORM_CFG_H_ -#define APP_PLATFORM_CFG_H_ - -#include "cybt_platform_config.h" -#include "cycfg_pins.h" - -extern const cybt_platform_config_t bt_platform_cfg_settings; - -#endif /* APP_BT_CFG_H_ */ - -/* [] END OF FILE */ +/******************************************************************************* + * (c) 2020, Cypress Semiconductor Corporation. All rights reserved. + ******************************************************************************* + * This software, including source code, documentation and related materials + * ("Software"), is owned by Cypress Semiconductor Corporation or one of its + * subsidiaries ("Cypress") and is protected by and subject to worldwide patent + * protection (United States and foreign), United States copyright laws and + * international treaty provisions. Therefore, you may use this Software only + * as provided in the license agreement accompanying the software package from + * which you obtained this Software ("EULA"). + * + * If no EULA applies, Cypress hereby grants you a personal, non-exclusive, + * non-transferable license to copy, modify, and compile the Software source + * code solely for use in connection with Cypress's integrated circuit products. + * Any reproduction, modification, translation, compilation, or representation + * of this Software except as specified above is prohibited without the express + * written permission of Cypress. + * + * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress + * reserves the right to make changes to the Software without notice. Cypress + * does not assume any liability arising out of the application or use of the + * Software or any product or circuit described in the Software. Cypress does + * not authorize its products for use in any products where a malfunction or + * failure of the Cypress product may reasonably be expected to result in + * significant property damage, injury or death ("High Risk Product"). By + * including Cypress's product in a High Risk Product, the manufacturer of such + * system or application assumes all risk of such use and in doing so agrees to + * indemnify Cypress against all liability. + *******************************************************************************/ + +/******************************************************************************* + * File Name: app_platform_cfg.h + * Version: 1.0 + * + * Description: + * Header file for runtime Bluetooth stack configuration parameters + * + *******************************************************************************/ + +#ifndef APP_PLATFORM_CFG_H_ +#define APP_PLATFORM_CFG_H_ + +#include "cybt_platform_config.h" +#include "cycfg_pins.h" + +extern const cybt_platform_config_t bt_platform_cfg_settings; + +#endif /* APP_BT_CFG_H_ */ + +/* [] END OF FILE */ diff --git a/src/test_driver/mbed/integration_tests/pytest.ini b/src/test_driver/mbed/integration_tests/pytest.ini index 6854576f00d5b4..410b8ec131a343 100644 --- a/src/test_driver/mbed/integration_tests/pytest.ini +++ b/src/test_driver/mbed/integration_tests/pytest.ini @@ -1,7 +1,7 @@ -[pytest] -log_cli = true -log_level = INFO -log_format = %(asctime)s.%(msecs)03d %(levelname)s %(message)s -log_cli_format = %(asctime)s.%(msecs)03d %(levelname)s %(message)s -markers = - smoketest: Test with large coverage and short run time +[pytest] +log_cli = true +log_level = INFO +log_format = %(asctime)s.%(msecs)03d %(levelname)s %(message)s +log_cli_format = %(asctime)s.%(msecs)03d %(levelname)s %(message)s +markers = + smoketest: Test with large coverage and short run time diff --git a/third_party/android_deps/gradlew.bat b/third_party/android_deps/gradlew.bat index ac1b06f93825db..107acd32c4e687 100644 --- a/third_party/android_deps/gradlew.bat +++ b/third_party/android_deps/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega