Skip to content

Commit 045bd36

Browse files
praveenCYisiu-apple
authored andcommitted
[Infineon] PSoC6 SVE2 Fixes for multiple test cases (project-chip#22646)
1 parent 6f72244 commit 045bd36

File tree

16 files changed

+58
-18
lines changed

16 files changed

+58
-18
lines changed

.vscode/tasks.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,9 @@
396396
"esp32-m5stack-all-clusters-ipv6only",
397397
"esp32-m5stack-all-clusters-rpc",
398398
"esp32-m5stack-all-clusters-rpc-ipv6only",
399-
"infineon-p6-all-clusters",
400-
"infineon-p6-lock",
401-
"infineon-p6-light",
399+
"infineon-psoc6-all-clusters",
400+
"infineon-psoc6-lock",
401+
"infineon-psoc6-light",
402402
"linux-arm64-all-clusters",
403403
"linux-arm64-all-clusters-ipv6only",
404404
"linux-arm64-chip-tool",

docs/guides/infineon_psoc6_software_update.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ Infineon PSoC6 example applications by passing the
2525

2626
```
2727
$ scripts/build/build_examples.py --enable-flashbundle --target infineon-psoc6-lock-ota build
28-
$ third_party/psoc6/psoc6_sdk/ota/ota_base_build.sh out/infineon-psoc6-lock-ota chip-psoc6-lock-example
28+
$ third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh out/infineon-psoc6-lock-ota chip-psoc6-lock-example
2929
```
3030

3131
- Build the PSoC6 OTA Update application from the chip root dir and create OTA
3232
file
3333

3434
```
3535
$ scripts/build/build_examples.py --enable-flashbundle --no-log-timestamps --target infineon-psoc6-lock-ota-updateimage build
36-
$ third_party/psoc6/psoc6_sdk/ota/ota_update_build.sh out/infineon-psoc6-lock-ota-updateimage chip-psoc6-lock-example
36+
$ third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh out/infineon-psoc6-lock-ota-updateimage chip-psoc6-lock-example
3737
```
3838

3939
* Additionally a pre-compiled bootloader must be flashed to the board using
4040
[Cypress Programmer](https://softwaretools.infineon.com/tools/com.ifx.tb.tool.cypressprogrammer).
4141
This image can be found at:
4242

43-
$ ./third_party/psoc6/psoc6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex
43+
$ ./third_party/infineon/psoc6/psoc6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex
4444

4545
* In a terminal start the Provider app passing to it the path to the Matter
4646
OTA file created in the previous step:(output of ota_update_build step)

examples/all-clusters-app/infineon/psoc6/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ config("psoc6_ota_config") {
8080

8181
psoc6_sdk_sources("all_clusters_app_sdk_sources") {
8282
include_dirs = [
83-
"${chip_root}/src/platform/PSOC6",
83+
"${chip_root}/src/platform/Infineon/PSOC6",
8484
"${psoc6_project_dir}/include",
8585
"${examples_plat_dir}",
8686
]

examples/all-clusters-app/infineon/psoc6/include/CHIPProjectConfig.h

+2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012
5252

5353
/* The SoftwareVersion attribute of the Basic cluster. */
54+
#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
5455
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1
56+
#endif
5557

5658
// For convenience, Chip Security Test Mode can be enabled and the
5759
// requirement for authentication in various protocols can be disabled.

examples/all-clusters-minimal-app/infineon/psoc6/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ config("psoc6_ota_config") {
8181

8282
psoc6_sdk_sources("all_clusters_app_sdk_sources") {
8383
include_dirs = [
84-
"${chip_root}/src/platform/PSOC6",
84+
"${chip_root}/src/platform/Infineon/PSOC6",
8585
"${psoc6_project_dir}/include",
8686
"${examples_plat_dir}",
8787
]

examples/all-clusters-minimal-app/infineon/psoc6/include/CHIPProjectConfig.h

+2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012
5252

5353
/* The SoftwareVersion attribute of the Basic cluster. */
54+
#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
5455
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1
56+
#endif
5557

5658
// For convenience, Chip Security Test Mode can be enabled and the
5759
// requirement for authentication in various protocols can be disabled.

examples/lighting-app/infineon/psoc6/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ config("psoc6_ota_config") {
8080

8181
psoc6_sdk_sources("lighting_app_sdk_sources") {
8282
include_dirs = [
83-
"${chip_root}/src/platform/PSOC6",
83+
"${chip_root}/src/platform/Infineon/PSOC6",
8484
"${psoc6_project_dir}/include",
8585
"${examples_plat_dir}",
8686
]

examples/lighting-app/infineon/psoc6/include/CHIPProjectConfig.h

+2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012
6161

6262
/* The SoftwareVersion attribute of the Basic cluster. */
63+
#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
6364
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1
65+
#endif
6466

6567
/* define Device type based on the application */
6668
#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 257 // 0x0101 Dimmable Bulb

examples/lighting-app/infineon/psoc6/src/AppTask.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include <setup_payload/SetupPayload.h>
4040

4141
#include <DeviceInfoProviderImpl.h>
42+
#include <app/clusters/identify-server/identify-server.h>
4243
#include <app/clusters/network-commissioning/network-commissioning.h>
4344
#include <platform/Infineon/PSOC6/NetworkCommissioningDriver.h>
4445

@@ -120,6 +121,23 @@ void NetWorkCommissioningInstInit()
120121
sWiFiNetworkCommissioningInstance.Init();
121122
}
122123

124+
void OnIdentifyStart(Identify *)
125+
{
126+
ChipLogProgress(Zcl, "OnIdentifyStart");
127+
}
128+
129+
void OnIdentifyStop(Identify *)
130+
{
131+
ChipLogProgress(Zcl, "OnIdentifyStop");
132+
}
133+
134+
static Identify gIdentify1 = {
135+
chip::EndpointId{ 1 },
136+
OnIdentifyStart,
137+
OnIdentifyStop,
138+
EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE,
139+
};
140+
123141
static void InitServer(intptr_t context)
124142
{
125143
// Init ZCL Data Model

examples/lock-app/infineon/psoc6/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ config("psoc6_ota_config") {
7676
}
7777
psoc6_sdk_sources("lock_app_sdk_sources") {
7878
include_dirs = [
79-
"${chip_root}/src/platform/PSOC6",
79+
"${chip_root}/src/platform/Infineon/PSOC6",
8080
"${psoc6_project_dir}/include",
8181
"${examples_plat_dir}",
8282
]

examples/lock-app/infineon/psoc6/include/CHIPProjectConfig.h

+2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION 43012
4848

4949
/* The SoftwareVersion attribute of the Basic cluster. */
50+
#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
5051
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 1
52+
#endif
5153

5254
/* define Device type based on the application */
5355
#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 10 // 0x00A Door lock

examples/lock-app/infineon/psoc6/src/AppTask.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,23 @@ void NetWorkCommissioningInstInit()
132132
sWiFiNetworkCommissioningInstance.Init();
133133
}
134134

135+
void OnIdentifyStart(Identify *)
136+
{
137+
ChipLogProgress(Zcl, "OnIdentifyStart");
138+
}
139+
140+
void OnIdentifyStop(Identify *)
141+
{
142+
ChipLogProgress(Zcl, "OnIdentifyStop");
143+
}
144+
145+
static Identify gIdentify1 = {
146+
chip::EndpointId{ 1 },
147+
OnIdentifyStart,
148+
OnIdentifyStop,
149+
EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE,
150+
};
151+
135152
static void InitServer(intptr_t context)
136153
{
137154
// Init ZCL Data Model

src/platform/Infineon/PSOC6/NetworkCommissioningWiFiDriver.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ void P6WiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callback
186186
{
187187
ChipLogError(NetworkProvisioning, "Failed to connect to WiFi network:%s", chip::ErrorStr(err));
188188
mpConnectCallback = nullptr;
189-
chip::DeviceLayer::PlatformMgr().LockChipStack();
190189
callback->OnResult(networkingStatus, CharSpan(), 0);
191-
chip::DeviceLayer::PlatformMgr().UnlockChipStack();
192190
}
193191
}
194192

@@ -365,8 +363,7 @@ void P6WiFiDriver::OnNetworkStatusChange()
365363
if (staConnected)
366364
{
367365
mpStatusChangeCallback->OnNetworkingStatusChange(
368-
Status::kSuccess, MakeOptional(ByteSpan(configuredNetwork.networkID, configuredNetwork.networkIDLen)),
369-
MakeOptional(GetLastDisconnectReason()));
366+
Status::kSuccess, MakeOptional(ByteSpan(configuredNetwork.networkID, configuredNetwork.networkIDLen)), NullOptional);
370367
return;
371368
}
372369
mpStatusChangeCallback->OnNetworkingStatusChange(

src/system/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ if (chip_device_platform == "cc13x2_26x2") {
4949
import("${qpg_sdk_build_root}/qpg_sdk.gni")
5050
} else if (chip_device_platform == "k32w0") {
5151
import("//build_overrides/k32w0_sdk.gni")
52-
} else if (chip_device_platform == "p6") {
53-
import("//build_overrides/p6.gni")
52+
} else if (chip_device_platform == "psoc6") {
53+
import("//build_overrides/psoc6.gni")
5454
} else if (chip_device_platform == "cyw30739") {
5555
import("//build_overrides/cyw30739_sdk.gni")
5656
} else if (chip_device_platform == "mt793x") {

third_party/infineon/psoc6/psoc6_sdk/ota/ota_base_build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OUT_DIR=$1
22
HEX_NAME=$2
3-
ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/
3+
ANYCLOUD_DIR=third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota/
44

55
mv "$OUT_DIR"/"$HEX_NAME".hex "$OUT_DIR"/"$HEX_NAME".unsigned.hex
66

third_party/infineon/psoc6/psoc6_sdk/ota/ota_update_build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OUT_DIR=$1
22
HEX_NAME=$2
3-
ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/
3+
ANYCLOUD_DIR=third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota/
44

55
mv "$OUT_DIR"/"$HEX_NAME".hex "$OUT_DIR"/"$HEX_NAME".unsigned.hex
66

0 commit comments

Comments
 (0)