zephyr/samples/modules/nanopb/README.rst
Pieter De Gendt b6979736ca modules: nanopb: introduce new module
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>
2021-04-08 14:57:55 +02:00

56 lines
1011 B
ReStructuredText

.. _nanopb_sample:
Nanopb sample
#############
Overview
********
A simple protocol buffer sample using Nanopb for serializing structured data
to platform independent raw buffers or streams.
Requirements
************
Nanopb uses the protocol buffer compiler to generate source and header files,
make sure the ``protoc`` executable is intalled and available.
.. tabs::
.. group-tab:: Ubuntu
Use ``apt`` to install dependency:
.. code-block:: bash
sudo apt install protobuf-compiler
.. group-tab:: macOS
Use ``brew`` to install dependency:
.. code-block:: bash
brew install protobuf
.. group-tab:: Windows
Use ``choco`` to install dependency:
.. code-block:: console
choco install protoc
Building and Running
********************
This application can be built as follows:
.. zephyr-app-commands::
:zephyr-app: samples/modules/nanopb
:host-os: unix
:board: qemu_x86
:goals: run
:compact: