project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.45k stars 1.99k forks source link

[BUG] [EFR32] Fail to build lighting-app with pigweed RPC #26388

Closed lboue closed 2 months ago

lboue commented 1 year ago

Reproduction steps

Fail to build lighting-app with pigweed RPC

This is an issue here: examples/lighting-app/silabs/efr32/third_party/connectedhomeip/examples/platform/silabs/Rpc.cpp:85:31 error: 'class AppTask' has no member named 'ButtonEventHandler'; did you mean 'static void

../../../examples/lighting-app/silabs/efr32/third_party/connectedhomeip/examples/platform/silabs/Rpc.cpp: In member function 'virtual pw::Status chip::rpc::Efr32Button::Event(const chip_rpc_ButtonEvent&, pw_protobuf_Empty&)':
../../../examples/lighting-app/silabs/efr32/third_party/connectedhomeip/examples/platform/silabs/Rpc.cpp:85:31: error: 'class AppTask' has no member named 'ButtonEventHandler'; did you mean 'static void BaseApplication::FunctionEventHandler(AppEvent*)'? (not accessible from this context)
   85 |         AppTask::GetAppTask().ButtonEventHandler(request.idx /* PB 0 or PB 1 */, request.pushed);
      |                               ^~~~~~~~~~~~~~~~~~
In file included from ../../../examples/lighting-app/silabs/efr32/include/AppTask.h:30,
                 from ../../../examples/lighting-app/silabs/efr32/third_party/connectedhomeip/examples/platform/silabs/Rpc.cpp:19:
../../../examples/lighting-app/silabs/efr32/third_party/connectedhomeip/examples/platform/silabs/efr32/BaseApplication.h:155:17: note: declared protected here
  155 |     static void FunctionEventHandler(AppEvent * aEvent);
      |                 ^~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics
ninja: build stopped: subcommand failed.

Bug prevalence

always

GitHub hash of the SDK that was being used

3d2170808186a16ac31d8f0dcf0fa1aeeedae071

Platform

efr32

Platform Version(s)

No response

Anything else?

No response

bzbarsky-apple commented 1 year ago

@jmartinez-silabs

jmartinez-silabs commented 1 year ago

Ah, I missed that one. There are no buttons on your Sparkfun board(BRD2704) therefore no handler. Pigweed rpc won't work on that board currently.

I'll look if it is possible to build the pw-rpc support without the button.

lboue commented 1 year ago

Ah, I missed that one. There are no buttons on your Sparkfun board(BRD2704) therefore no handler. Pigweed rpc won't work on that board currently.

I'll look if it is possible to build the pw-rpc support without the button.

And if I connect buttons to the GPIO ports?

lboue commented 1 year ago

@jmartinez-silabs jmartinez-silabs

Ah, I missed that one. There are no buttons on your Sparkfun board(BRD2704) therefore no handler. Pigweed rpc won't work on that board currently.

I'll look if it is possible to build the pw-rpc support without the button.

Do you think it is possible to fix this error?

jmartinez-silabs commented 1 year ago

@lboue didn't have time to check yet.

do you have a usecase for PW rpc with spake fun?

lboue commented 7 months ago

It works now. Thanks to this PR #32506:

user@ubuntu:~/connectedhomeip$ ./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/ out/lighting_app_rpc BRD2704A 'import("//with_pw_rpc.gni")'
user@ubuntu:~/connectedhomeip$ ls ./out/lighting_app_rpc/BRD2704A/
args.gn        build.ninja.stamp      gen                           matter-silabs-lighting-example.flash.py  matter-silabs-lighting-example.out.map  protocol_buffer  relative_path_transformations.json  zap_gen.lock
build.ninja    compile_commands.json  lib                           matter-silabs-lighting-example.hex       matter-silabs-lighting-example.s37      python           silabs_firmware_utils.py
build.ninja.d  firmware_utils.py      lighting_app.flashbundle.txt  matter-silabs-lighting-example.out       obj                                     python-venv      toolchain.ninja
jmartinez-silabs commented 7 months ago

@lboue I don't see how that pr is correlated to the buttons in pw RPC assumes. Are you sure that the pr your links has any impact in it working or not