Nanopb generates header files that need to be available before being
included. This isn't an issue for a target where the files were added
with zephyr_nanopb_sources. But if another target wants to include
these generated files we need a cmake dependency chain.
The nanopb_generated_headers custom target been added for this purpose.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The Nanopb cmake locates the protoc executable, verify the result
instead of doing it ourselves.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Introduce a helper function zephyr_nanopb_sources to generate
source files and add these to a target.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:
sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add the nanopb library and generator tools as a module.
Nanopb is a small code-size Protocol Buffers implementation in ansi C.
It is especially suitable for use in microcontrollers,
but fits any memory restricted system.
Nanopb home: https://jpa.kapsi.fi/nanopb/
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>