Skip to content

Commit 6025455

Browse files
Bump third_party/pigweed/repo from 73cac22 to b88cd71 (project-chip#26133)
* Pin new pigweed branch * Fix issues caught in CI * Fix CI * Clean up * Fix QPG plaform CI issues * Fix CI issues for Ameba * Fix Ameba CI for real this time * Restyle * Fix k32w0 and mw320 CI * Restyle * CI fixes for TI platform stuff * Fixes CI for Infineon * Fix/efr32 ci with pw roll up (project-chip#113) * add syscall_stubs to efr32 test driver to support gcc 12 * fix release pw rpc build, and test driver * Fix CI for Infineon cyw30739 * Roll to latest pigweed commit * Clean up for review * Fix CI * Restyle * Fix CI --------- Co-authored-by: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com>
1 parent b42d23a commit 6025455

File tree

23 files changed

+779
-86
lines changed

23 files changed

+779
-86
lines changed

examples/all-clusters-app/nxp/mw320/BUILD.gn

+6-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ mw320_executable("shell_mw320") {
6363
"${chip_root}/src/setup_payload",
6464
]
6565

66+
deps = [ "${chip_root}/src/platform:syscalls_stub" ]
67+
6668
include_dirs = [
6769
"${chip_root}/src/platform/nxp/mw320",
6870
"${examples_plat_dir}/app/project_include",
@@ -84,7 +86,10 @@ mw320_executable("shell_mw320") {
8486

8587
ldscript = "${examples_plat_dir}/app/ldscripts/88MW320_xx_xxxx_flash.ld"
8688

87-
ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]
89+
ldflags = [
90+
"-T" + rebase_path(ldscript, root_build_dir),
91+
"-Wl,--no-warn-rwx-segment",
92+
]
8893
defines = [
8994
"MW320_SHELL_STREAMER",
9095
"SHELL_STREAMER_APP_SPECIFIC",

examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ k32w0_executable("contact_sensor_app") {
108108
"${chip_root}/examples/contact-sensor-app/contact-sensor-common",
109109
"${chip_root}/examples/providers:device_info_provider",
110110
"${chip_root}/src/lib",
111+
"${chip_root}/src/platform:syscalls_stub",
111112
"${chip_root}/third_party/mbedtls:mbedtls",
112113
"${k32w0_platform_dir}/app/support:freertos_mbedtls_utils",
113114
]

examples/lighting-app/nxp/k32w/k32w0/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ k32w0_executable("light_app") {
110110
"${chip_root}/examples/lighting-app/nxp/zap/",
111111
"${chip_root}/examples/providers:device_info_provider",
112112
"${chip_root}/src/lib",
113+
"${chip_root}/src/platform:syscalls_stub",
113114
"${chip_root}/third_party/mbedtls:mbedtls",
114115
"${k32w0_platform_dir}/app/support:freertos_mbedtls_utils",
115116
]

examples/lock-app/nxp/k32w/k32w0/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ k32w0_executable("lock_app") {
109109
"${chip_root}/examples/providers:device_info_provider",
110110
"${chip_root}/src/crypto",
111111
"${chip_root}/src/lib",
112+
"${chip_root}/src/platform:syscalls_stub",
112113
"${chip_root}/third_party/mbedtls:mbedtls",
113114
"${chip_root}/third_party/simw-top-mini:se05x",
114115
"${k32w0_platform_dir}/app/support:freertos_mbedtls_utils",

examples/platform/linux/system_rpc_server.cc

+9-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ namespace {
3737
constexpr size_t kMaxTransmissionUnit = 512;
3838
uint16_t socket_port = 33000;
3939

40+
stream::ServerSocket server_socket;
4041
stream::SocketStream socket_stream;
4142

4243
hdlc::RpcChannelOutput hdlc_channel_output(socket_stream, hdlc::kDefaultRpcAddress, "HDLC channel");
@@ -63,7 +64,10 @@ void Init()
6364
});
6465

6566
PW_LOG_INFO("Starting pw_rpc server on port %d", socket_port);
66-
PW_CHECK_OK(socket_stream.Serve(socket_port));
67+
PW_CHECK_OK(server_socket.Listen(socket_port));
68+
auto accept_result = server_socket.Accept();
69+
PW_CHECK_OK(accept_result.status());
70+
socket_stream = *std::move(accept_result);
6771
}
6872

6973
rpc::Server & Server()
@@ -88,7 +92,10 @@ Status Start()
8892
// An out of range status indicates the remote end has disconnected.
8993
// Start to serve the connection again, which will allow another
9094
// remote to connect.
91-
PW_CHECK_OK(socket_stream.Serve(socket_port));
95+
PW_CHECK_OK(server_socket.Listen(socket_port));
96+
auto accept_result = server_socket.Accept();
97+
PW_CHECK_OK(accept_result.status());
98+
socket_stream = *std::move(accept_result);
9299
}
93100
continue;
94101
}

examples/platform/nxp/mw320/BUILD.gn

-27
This file was deleted.

examples/platform/silabs/efr32/BUILD.gn

+1-3
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ config("efr32-common-config") {
228228
defines += [ "HEAP_MONITORING" ]
229229
}
230230

231-
# Do not warn for LOAD segment with RWX permissions
232-
# Uncomment this cflag when pigweed update is done and GCC 12.2 is used.
233-
#ldflags = [ "-Wl,--no-warn-rwx-segment" ]
231+
ldflags = [ "-Wl,--no-warn-rwx-segment" ]
234232
}
235233

236234
config("silabs-wifi-config") {

examples/shell/nxp/k32w/k32w0/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ k32w0_executable("shell_app") {
6767
"${chip_root}/examples/common/QRCode",
6868
"${chip_root}/examples/lock-app/lock-common",
6969
"${chip_root}/examples/shell/shell_common:shell_common",
70+
"${chip_root}/src/platform:syscalls_stub",
7071
"${chip_root}/third_party/mbedtls:mbedtls",
7172
"${chip_root}/third_party/simw-top-mini:se05x",
7273
"${k32w0_platform_dir}/app/support:freertos_mbedtls_utils",

src/platform/Ameba/DiagnosticDataProviderImpl.cpp

+40-47
Original file line numberDiff line numberDiff line change
@@ -186,56 +186,49 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface **
186186
NetworkInterface * head = NULL;
187187
struct ifaddrs * ifaddr = nullptr;
188188

189-
if (xnetif == NULL)
189+
// xnetif is never null, no need to check. If we do check with -Werror=address, we get compiler error.
190+
for (struct netif * ifa = xnetif; ifa != NULL; ifa = ifa->next)
190191
{
191-
ChipLogError(DeviceLayer, "Failed to get network interfaces");
192-
}
193-
else
194-
{
195-
for (struct netif * ifa = xnetif; ifa != NULL; ifa = ifa->next)
192+
NetworkInterface * ifp = new NetworkInterface();
193+
194+
Platform::CopyString(ifp->Name, ifa->name);
195+
196+
ifp->name = CharSpan::fromCharString(ifp->Name);
197+
ifp->isOperational = true;
198+
if ((ifa->flags) & NETIF_FLAG_ETHERNET)
199+
ifp->type = EMBER_ZCL_INTERFACE_TYPE_ENUM_ETHERNET;
200+
else
201+
ifp->type = EMBER_ZCL_INTERFACE_TYPE_ENUM_WI_FI;
202+
ifp->offPremiseServicesReachableIPv4.SetNull();
203+
ifp->offPremiseServicesReachableIPv6.SetNull();
204+
205+
memcpy(ifp->MacAddress, ifa->hwaddr, sizeof(ifa->hwaddr));
206+
207+
if (0)
196208
{
197-
NetworkInterface * ifp = new NetworkInterface();
198-
199-
Platform::CopyString(ifp->Name, ifa->name);
200-
201-
ifp->name = CharSpan::fromCharString(ifp->Name);
202-
ifp->isOperational = true;
203-
if ((ifa->flags) & NETIF_FLAG_ETHERNET)
204-
ifp->type = EMBER_ZCL_INTERFACE_TYPE_ENUM_ETHERNET;
205-
else
206-
ifp->type = EMBER_ZCL_INTERFACE_TYPE_ENUM_WI_FI;
207-
ifp->offPremiseServicesReachableIPv4.SetNull();
208-
ifp->offPremiseServicesReachableIPv6.SetNull();
209-
210-
memcpy(ifp->MacAddress, ifa->hwaddr, sizeof(ifa->hwaddr));
211-
212-
if (0)
213-
{
214-
ChipLogError(DeviceLayer, "Failed to get network hardware address");
215-
}
216-
else
217-
{
218-
// Set 48-bit IEEE MAC Address
219-
ifp->hardwareAddress = ByteSpan(ifp->MacAddress, 6);
220-
}
221-
222-
if (ifa->ip_addr.u_addr.ip4.addr != 0)
223-
{
224-
memcpy(ifp->Ipv4AddressesBuffer[0], &(ifa->ip_addr.u_addr.ip4.addr), kMaxIPv4AddrSize);
225-
ifp->Ipv4AddressSpans[0] = ByteSpan(ifp->Ipv4AddressesBuffer[0], kMaxIPv4AddrSize);
226-
ifp->IPv4Addresses = chip::app::DataModel::List<chip::ByteSpan>(ifp->Ipv4AddressSpans, 1);
227-
}
228-
229-
if (ifa->ip6_addr->u_addr.ip6.addr != 0)
230-
{
231-
memcpy(ifp->Ipv6AddressesBuffer[0], &(ifa->ip6_addr->u_addr.ip6.addr), kMaxIPv6AddrSize);
232-
ifp->Ipv6AddressSpans[0] = ByteSpan(ifp->Ipv6AddressesBuffer[0], kMaxIPv6AddrSize);
233-
ifp->IPv6Addresses = chip::app::DataModel::List<chip::ByteSpan>(ifp->Ipv6AddressSpans, 1);
234-
}
235-
236-
ifp->Next = head;
237-
head = ifp;
209+
ChipLogError(DeviceLayer, "Failed to get network hardware address");
238210
}
211+
else
212+
{
213+
// Set 48-bit IEEE MAC Address
214+
ifp->hardwareAddress = ByteSpan(ifp->MacAddress, 6);
215+
}
216+
217+
if (ifa->ip_addr.u_addr.ip4.addr != 0)
218+
{
219+
memcpy(ifp->Ipv4AddressesBuffer[0], &(ifa->ip_addr.u_addr.ip4.addr), kMaxIPv4AddrSize);
220+
ifp->Ipv4AddressSpans[0] = ByteSpan(ifp->Ipv4AddressesBuffer[0], kMaxIPv4AddrSize);
221+
ifp->IPv4Addresses = chip::app::DataModel::List<chip::ByteSpan>(ifp->Ipv4AddressSpans, 1);
222+
}
223+
224+
// ifa->ip6_addr->u_addr.ip6.addr is never null, no need to check. If we do check with -Werror=address, we get compiler
225+
// error.
226+
memcpy(ifp->Ipv6AddressesBuffer[0], &(ifa->ip6_addr->u_addr.ip6.addr), kMaxIPv6AddrSize);
227+
ifp->Ipv6AddressSpans[0] = ByteSpan(ifp->Ipv6AddressesBuffer[0], kMaxIPv6AddrSize);
228+
ifp->IPv6Addresses = chip::app::DataModel::List<chip::ByteSpan>(ifp->Ipv6AddressSpans, 1);
229+
230+
ifp->Next = head;
231+
head = ifp;
239232
}
240233

241234
*netifpp = head;

src/platform/BUILD.gn

+4
Original file line numberDiff line numberDiff line change
@@ -487,3 +487,7 @@ if (chip_device_platform != "none") {
487487
public_deps = [ ":platform_buildconfig" ]
488488
}
489489
}
490+
491+
source_set("syscalls_stub") {
492+
sources = [ "SyscallStubs.cpp" ]
493+
}

0 commit comments

Comments
 (0)