diff --git a/examples/common/pigweed/rpc_services/Descriptor.h b/examples/common/pigweed/rpc_services/Descriptor.h index c8f99ba34fa60b..fca22fa1234aa8 100644 --- a/examples/common/pigweed/rpc_services/Descriptor.h +++ b/examples/common/pigweed/rpc_services/Descriptor.h @@ -83,7 +83,7 @@ class Descriptor : public pw_rpc::nanopb::Descriptor::Service EndpointId endpoint_id = emberAfEndpointFromIndex(index); if (endpoint_id == 0) continue; - chip_rpc_Endpoint out{ endpoint : endpoint_id }; + chip_rpc_Endpoint out{ .endpoint = endpoint_id }; writer.Write(out); } } @@ -99,7 +99,7 @@ class Descriptor : public pw_rpc::nanopb::Descriptor::Service for (uint8_t cluster_index = 0; cluster_index < cluster_count; cluster_index++) { const EmberAfCluster * cluster = emberAfGetNthCluster(endpoint, cluster_index, server); - chip_rpc_Cluster out{ cluster_id : cluster->clusterId }; + chip_rpc_Cluster out{ .cluster_id = cluster->clusterId }; writer.Write(out); } writer.Finish(); diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 8da82b15afb09b..d4d16f07a2940c 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -247,6 +247,7 @@ def HostTargets(): app_targets.append(target.Extend('thermostat', app=HostApp.THERMOSTAT)) app_targets.append(target.Extend('minmdns', app=HostApp.MIN_MDNS)) app_targets.append(target.Extend('light', app=HostApp.LIGHT)) + app_targets.append(target.Extend('light-rpc', app=HostApp.LIGHT, enable_rpcs=True)) app_targets.append(target.Extend('lock', app=HostApp.LOCK)) app_targets.append(target.Extend('shell', app=HostApp.SHELL)) app_targets.append(target.Extend( diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 77903cd64ca7e8..e2d9995652b48a 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -198,7 +198,7 @@ class HostBuilder(GnBuilder): def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_ipv4=True, enable_ble=True, enable_wifi=True, use_tsan=False, use_asan=False, separate_event_loop=True, use_libfuzzer=False, use_clang=False, interactive_mode=True, extra_tests=False, - use_platform_mdns=False): + use_platform_mdns=False, enable_rpcs: bool=False): super(HostBuilder, self).__init__( root=os.path.join(root, 'examples', app.ExamplePath()), runner=runner) @@ -207,6 +207,9 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_ip self.board = board self.extra_gn_options = [] + if enable_rpcs: + self.extra_gn_options.append('import("//with_pw_rpc.gni")') + if not enable_ipv4: self.extra_gn_options.append('chip_inet_config_enable_ipv4=false')