1.. _nanopb_sample: 2 3Nanopb sample 4############# 5 6Overview 7******** 8 9A simple protocol buffer sample using Nanopb for serializing structured data 10to platform independent raw buffers or streams. 11 12 13Requirements 14************ 15 16Nanopb uses the protocol buffer compiler to generate source and header files, 17make sure the ``protoc`` executable is installed and available. 18 19.. tabs:: 20 21 .. group-tab:: Ubuntu 22 23 Use ``apt`` to install dependency: 24 25 .. code-block:: bash 26 27 sudo apt install protobuf-compiler 28 29 .. group-tab:: macOS 30 31 Use ``brew`` to install dependency: 32 33 .. code-block:: bash 34 35 brew install protobuf 36 37 .. group-tab:: Windows 38 39 Use ``choco`` to install dependency: 40 41 .. code-block:: console 42 43 choco install protoc 44 45Building and Running 46******************** 47 48This application can be built as follows: 49 50.. zephyr-app-commands:: 51 :zephyr-app: samples/modules/nanopb 52 :host-os: unix 53 :board: qemu_x86 54 :goals: run 55 :compact: 56