diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7420356b79ded4..d6fedb4eb102bd 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -396,9 +396,9 @@ "esp32-m5stack-all-clusters-ipv6only", "esp32-m5stack-all-clusters-rpc", "esp32-m5stack-all-clusters-rpc-ipv6only", - "infineon-p6-all-clusters", - "infineon-p6-lock", - "infineon-p6-light", + "infineon-psoc6-all-clusters", + "infineon-psoc6-lock", + "infineon-psoc6-light", "linux-arm64-all-clusters", "linux-arm64-all-clusters-ipv6only", "linux-arm64-chip-tool", diff --git a/docs/guides/infineon_psoc6_software_update.md b/docs/guides/infineon_psoc6_software_update.md index 7cddc020c6c417..713b0b1409b254 100644 --- a/docs/guides/infineon_psoc6_software_update.md +++ b/docs/guides/infineon_psoc6_software_update.md @@ -25,7 +25,7 @@ Infineon PSoC6 example applications by passing the ``` $ scripts/build/build_examples.py --enable-flashbundle --target infineon-psoc6-lock-ota build - $ third_party/psoc6/psoc6_sdk/ota/ota_base_build.sh out/infineon-psoc6-lock-ota chip-psoc6-lock-example + $ third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh out/infineon-psoc6-lock-ota chip-psoc6-lock-example ``` - Build the PSoC6 OTA Update application from the chip root dir and create OTA @@ -33,14 +33,14 @@ Infineon PSoC6 example applications by passing the ``` $ scripts/build/build_examples.py --enable-flashbundle --no-log-timestamps --target infineon-psoc6-lock-ota-updateimage build - $ third_party/psoc6/psoc6_sdk/ota/ota_update_build.sh out/infineon-psoc6-lock-ota-updateimage chip-psoc6-lock-example + $ third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh out/infineon-psoc6-lock-ota-updateimage chip-psoc6-lock-example ``` * Additionally a pre-compiled bootloader must be flashed to the board using [Cypress Programmer](https://softwaretools.infineon.com/tools/com.ifx.tb.tool.cypressprogrammer). This image can be found at: - $ ./third_party/psoc6/psoc6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex + $ ./third_party/infineon/psoc6/psoc6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex * In a terminal start the Provider app passing to it the path to the Matter OTA file created in the previous step:(output of ota_update_build step) diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index a92d8fb969e171..da0b632e4c6902 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -80,7 +80,7 @@ config("psoc6_ota_config") { psoc6_sdk_sources("all_clusters_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/PSOC6", + "${chip_root}/src/platform/Infineon/PSOC6", "${psoc6_project_dir}/include", "${examples_plat_dir}", ] diff --git a/examples/all-clusters-app/infineon/psoc6/include/CHIPProjectConfig.h b/examples/all-clusters-app/infineon/psoc6/include/CHIPProjectConfig.h index 3f304a5f55728c..0a5cd4efec0794 100644 --- a/examples/all-clusters-app/infineon/psoc6/include/CHIPProjectConfig.h +++ b/examples/all-clusters-app/infineon/psoc6/include/CHIPProjectConfig.h @@ -51,7 +51,9 @@ #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012 /* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#endif // For convenience, Chip Security Test Mode can be enabled and the // requirement for authentication in various protocols can be disabled. diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn index 2b90698856083a..970717895d79d8 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn @@ -81,7 +81,7 @@ config("psoc6_ota_config") { psoc6_sdk_sources("all_clusters_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/PSOC6", + "${chip_root}/src/platform/Infineon/PSOC6", "${psoc6_project_dir}/include", "${examples_plat_dir}", ] diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/include/CHIPProjectConfig.h b/examples/all-clusters-minimal-app/infineon/psoc6/include/CHIPProjectConfig.h index 69252cf8c260d1..001bb12db20f0c 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/include/CHIPProjectConfig.h +++ b/examples/all-clusters-minimal-app/infineon/psoc6/include/CHIPProjectConfig.h @@ -51,7 +51,9 @@ #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012 /* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#endif // For convenience, Chip Security Test Mode can be enabled and the // requirement for authentication in various protocols can be disabled. diff --git a/examples/lighting-app/infineon/psoc6/BUILD.gn b/examples/lighting-app/infineon/psoc6/BUILD.gn index 08a91b1180728f..ee8baf91f9ea6b 100644 --- a/examples/lighting-app/infineon/psoc6/BUILD.gn +++ b/examples/lighting-app/infineon/psoc6/BUILD.gn @@ -80,7 +80,7 @@ config("psoc6_ota_config") { psoc6_sdk_sources("lighting_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/PSOC6", + "${chip_root}/src/platform/Infineon/PSOC6", "${psoc6_project_dir}/include", "${examples_plat_dir}", ] diff --git a/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h b/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h index 60aa10e99b238d..6dc6ec3b282109 100644 --- a/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h +++ b/examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h @@ -60,7 +60,9 @@ #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012 /* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#endif /* define Device type based on the application */ #define CHIP_DEVICE_CONFIG_DEVICE_TYPE 257 // 0x0101 Dimmable Bulb diff --git a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp index 2ee2baf54bcde8..811f5ec2389cb9 100644 --- a/examples/lighting-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lighting-app/infineon/psoc6/src/AppTask.cpp @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -120,6 +121,23 @@ void NetWorkCommissioningInstInit() sWiFiNetworkCommissioningInstance.Init(); } +void OnIdentifyStart(Identify *) +{ + ChipLogProgress(Zcl, "OnIdentifyStart"); +} + +void OnIdentifyStop(Identify *) +{ + ChipLogProgress(Zcl, "OnIdentifyStop"); +} + +static Identify gIdentify1 = { + chip::EndpointId{ 1 }, + OnIdentifyStart, + OnIdentifyStop, + EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE, +}; + static void InitServer(intptr_t context) { // Init ZCL Data Model diff --git a/examples/lock-app/infineon/psoc6/BUILD.gn b/examples/lock-app/infineon/psoc6/BUILD.gn index 83823b18d0eaff..b575a7517cd4e9 100644 --- a/examples/lock-app/infineon/psoc6/BUILD.gn +++ b/examples/lock-app/infineon/psoc6/BUILD.gn @@ -76,7 +76,7 @@ config("psoc6_ota_config") { } psoc6_sdk_sources("lock_app_sdk_sources") { include_dirs = [ - "${chip_root}/src/platform/PSOC6", + "${chip_root}/src/platform/Infineon/PSOC6", "${psoc6_project_dir}/include", "${examples_plat_dir}", ] diff --git a/examples/lock-app/infineon/psoc6/include/CHIPProjectConfig.h b/examples/lock-app/infineon/psoc6/include/CHIPProjectConfig.h index d6d5fe34815b0d..b069e13284c07d 100644 --- a/examples/lock-app/infineon/psoc6/include/CHIPProjectConfig.h +++ b/examples/lock-app/infineon/psoc6/include/CHIPProjectConfig.h @@ -47,7 +47,9 @@ #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012 /* The SoftwareVersion attribute of the Basic cluster. */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1 +#endif /* define Device type based on the application */ #define CHIP_DEVICE_CONFIG_DEVICE_TYPE 10 // 0x00A Door lock diff --git a/examples/lock-app/infineon/psoc6/src/AppTask.cpp b/examples/lock-app/infineon/psoc6/src/AppTask.cpp index fe4baf6eb3f752..75a62037caad22 100644 --- a/examples/lock-app/infineon/psoc6/src/AppTask.cpp +++ b/examples/lock-app/infineon/psoc6/src/AppTask.cpp @@ -132,6 +132,23 @@ void NetWorkCommissioningInstInit() sWiFiNetworkCommissioningInstance.Init(); } +void OnIdentifyStart(Identify *) +{ + ChipLogProgress(Zcl, "OnIdentifyStart"); +} + +void OnIdentifyStop(Identify *) +{ + ChipLogProgress(Zcl, "OnIdentifyStop"); +} + +static Identify gIdentify1 = { + chip::EndpointId{ 1 }, + OnIdentifyStart, + OnIdentifyStop, + EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE, +}; + static void InitServer(intptr_t context) { // Init ZCL Data Model diff --git a/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp b/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp index 7f94651fb9b61e..d8e413236953a5 100644 --- a/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp @@ -186,9 +186,7 @@ void P6WiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback { ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network:%s", chip::ErrorStr(err)); mpConnectCallback = nullptr; - chip::DeviceLayer::PlatformMgr().LockChipStack(); callback->OnResult(networkingStatus, CharSpan(), 0); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); } } @@ -365,8 +363,7 @@ void P6WiFiDriver::OnNetworkStatusChange() if (staConnected) { mpStatusChangeCallback->OnNetworkingStatusChange( - Status::kSuccess, MakeOptional(ByteSpan(configuredNetwork.networkID, configuredNetwork.networkIDLen)), - MakeOptional(GetLastDisconnectReason())); + Status::kSuccess, MakeOptional(ByteSpan(configuredNetwork.networkID, configuredNetwork.networkIDLen)), NullOptional); return; } mpStatusChangeCallback->OnNetworkingStatusChange( diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 97a13e1afc94cc..76d64235fd0389 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -49,8 +49,8 @@ if (chip_device_platform == "cc13x2_26x2") { import("${qpg_sdk_build_root}/qpg_sdk.gni") } else if (chip_device_platform == "k32w0") { import("//build_overrides/k32w0_sdk.gni") -} else if (chip_device_platform == "p6") { - import("//build_overrides/p6.gni") +} else if (chip_device_platform == "psoc6") { + import("//build_overrides/psoc6.gni") } else if (chip_device_platform == "cyw30739") { import("//build_overrides/cyw30739_sdk.gni") } else if (chip_device_platform == "mt793x") { diff --git a/third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh b/third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh index ca072f8a88cc9a..ef6bf3bc30ad95 100755 --- a/third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh +++ b/third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh @@ -1,6 +1,6 @@ OUT_DIR=$1 HEX_NAME=$2 -ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/ +ANYCLOUD_DIR=third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota/ mv "$OUT_DIR"/"$HEX_NAME".hex "$OUT_DIR"/"$HEX_NAME".unsigned.hex diff --git a/third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh b/third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh index 4a02cc89be9153..4f1c67797967bb 100755 --- a/third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh +++ b/third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh @@ -1,6 +1,6 @@ OUT_DIR=$1 HEX_NAME=$2 -ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/ +ANYCLOUD_DIR=third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota/ mv "$OUT_DIR"/"$HEX_NAME".hex "$OUT_DIR"/"$HEX_NAME".unsigned.hex