Home | History | Annotate | only in /external/nanopb-c
Up to higher level directory
NameDateSize
Android.bp22-Oct-20201.8K
AUTHORS.txt22-Oct-20201.6K
BUILD22-Oct-2020340
CHANGELOG.txt22-Oct-202012.7K
CleanSpec.mk22-Oct-20202.3K
CMakeLists.txt22-Oct-20203.1K
CONTRIBUTING.md22-Oct-20201.2K
docs/22-Oct-2020
examples/22-Oct-2020
extra/22-Oct-2020
generator/22-Oct-2020
library.json22-Oct-2020743
LICENSE.txt22-Oct-2020898
MODULE_LICENSE_PUBLIC_DOMAIN22-Oct-20200
NOTICE22-Oct-2020898
OWNERS22-Oct-2020180
patches/22-Oct-2020
pb.h22-Oct-202022.7K
pb_common.c22-Oct-20202.9K
pb_common.h22-Oct-20201.4K
pb_decode.c22-Oct-202046.4K
pb_decode.h22-Oct-20206.4K
pb_encode.c22-Oct-202025.9K
pb_encode.h22-Oct-20206.1K
README.android22-Oct-2020422
README.md22-Oct-20202.9K
README.version22-Oct-202098
tests/22-Oct-2020
tools/22-Oct-2020
WORKSPACE22-Oct-202043

README.android

      1 URL: https://jpa.kapsi.fi/nanopb/
      2 Version: 0.3.9.1
      3 License: zlib
      4 Description: "nanopb-c: A plugin for Google Protobuf compiler that generates C code"
      5 
      6 To use with Android modify Android.mk adding .proto files to
      7 LOCAL_SRC_FILES and set LOCAL_PROTOC_OPTIMIZE_TYPE:
      8 
      9   LOCAL_SRC_FILES += simple.proto
     10   LOCAL_PROTOC_OPTIMIZE_TYPE := nanopb-c
     11 
     12 Then look at https://jpa.kapsi.fi/nanopb/ Documentation for how to use nanopb-c.
     13 

README.md

      1 Nanopb - Protocol Buffers for Embedded Systems
      2 ==============================================
      3 
      4 [![Build Status](https://travis-ci.org/nanopb/nanopb.svg?branch=master)](https://travis-ci.org/nanopb/nanopb)
      5 
      6 Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is
      7 especially suitable for use in microcontrollers, but fits any memory
      8 restricted system.
      9 
     10 * **Homepage:** https://jpa.kapsi.fi/nanopb/
     11 * **Documentation:** https://jpa.kapsi.fi/nanopb/docs/
     12 * **Downloads:** https://jpa.kapsi.fi/nanopb/download/
     13 * **Forum:** https://groups.google.com/forum/#!forum/nanopb
     14 
     15 
     16 
     17 Using the nanopb library
     18 ------------------------
     19 To use the nanopb library, you need to do two things:
     20 
     21 1. Compile your .proto files for nanopb, using protoc.
     22 2. Include pb_encode.c, pb_decode.c and pb_common.c in your project.
     23 
     24 The easiest way to get started is to study the project in "examples/simple".
     25 It contains a Makefile, which should work directly under most Linux systems.
     26 However, for any other kind of build system, see the manual steps in
     27 README.txt in that folder.
     28 
     29 
     30 
     31 Using the Protocol Buffers compiler (protoc)
     32 --------------------------------------------
     33 The nanopb generator is implemented as a plugin for the Google's own protoc
     34 compiler. This has the advantage that there is no need to reimplement the
     35 basic parsing of .proto files. However, it does mean that you need the
     36 Google's protobuf library in order to run the generator.
     37 
     38 If you have downloaded a binary package for nanopb (either Windows, Linux or
     39 Mac OS X version), the 'protoc' binary is included in the 'generator-bin'
     40 folder. In this case, you are ready to go. Simply run this command:
     41 
     42     generator-bin/protoc --nanopb_out=. myprotocol.proto
     43 
     44 However, if you are using a git checkout or a plain source distribution, you
     45 need to provide your own version of protoc and the Google's protobuf library.
     46 On Linux, the necessary packages are protobuf-compiler and python-protobuf.
     47 On Windows, you can either build Google's protobuf library from source or use
     48 one of the binary distributions of it. In either case, if you use a separate
     49 protoc, you need to manually give the path to nanopb generator:
     50 
     51     protoc --plugin=protoc-gen-nanopb=nanopb/generator/protoc-gen-nanopb ...
     52 
     53 
     54 
     55 Running the tests
     56 -----------------
     57 If you want to perform further development of the nanopb core, or to verify
     58 its functionality using your compiler and platform, you'll want to run the
     59 test suite. The build rules for the test suite are implemented using Scons,
     60 so you need to have that installed. To run the tests:
     61 
     62     cd tests
     63     scons
     64 
     65 This will show the progress of various test cases. If the output does not
     66 end in an error, the test cases were successful.
     67 
     68 Note: Mac OS X by default aliases 'clang' as 'gcc', while not actually
     69 supporting the same command line options as gcc does. To run tests on
     70 Mac OS X, use: "scons CC=clang CXX=clang". Same way can be used to run
     71 tests with different compilers on any platform.
     72 

README.version

      1 URL: https://github.com/nanopb/nanopb/archive/0.3.9.1.tar.gz
      2 Version: 0.3.9.1
      3 BugComponent: 31808
      4