Is there support for Google's Common Types (e.g. timestamp.proto) for nanopb in Zephyr?

I am wondering about the common types defined by google and available as part of the standard protoc compiler. I would like to use the Timestamp and Duration types. I have added the following line to my .proto file.

import "google/protobuf/timestamp.proto";

Running protoc from the command line handles this just fine, even though there is no "timestamp.proto" in the project. Running the build for the nRF5340 from VS Code however fails with the message "fatal error: google/protobuf/timestamp.pb.h: No such file or directory".

The CMakeLists.txt is set up the same as in zephyr/samples/modules/nanopb.


find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(NONE)
#NANOPB
# Note that here, we're adding CMAKE_SOURCE_DIR to the include path for nanopb.
# This is needed because the below call to nanopb_generate_cpp() is using
# 'RELPATH .'
set(NANOPB_OPTIONS "-I${CMAKE_SOURCE_DIR}")
nanopb_generate_cpp(proto_sources proto_headers RELPATH .
    src/interface.proto
)

Is this simply not possible, or do I need to do something different with the CMake?

Related