Home | History | Annotate | only in /external/nanopb-c
Up to higher level directory
NameDateSize
Android.bp21-Aug-20181.2K
CHANGELOG.txt21-Aug-20185.8K
CleanSpec.mk21-Aug-20182.3K
docs/21-Aug-2018
examples/21-Aug-2018
extra/21-Aug-2018
generator/21-Aug-2018
LICENSE.txt21-Aug-2018898
MODULE_LICENSE_PUBLIC_DOMAIN21-Aug-20180
NOTICE21-Aug-2018898
pb.h21-Aug-201818.9K
pb_decode.c21-Aug-201835.2K
pb_decode.h21-Aug-20185.3K
pb_encode.c21-Aug-201819.4K
pb_encode.h21-Aug-20185.6K
README.android21-Aug-2018428
README.txt21-Aug-20182.3K
README.version21-Aug-2018102
tests/21-Aug-2018
tools/21-Aug-2018

README.android

      1 URL: http://koti.kapsi.fi/jpa/nanopb/
      2 Version: 2.8.0
      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 http://koti.kapsi.fi/jpa/nanopb/ Documentation for how to use nanopb-c.
     13 

README.txt

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

README.version

      1 URL: http://koti.kapsi.fi/~jpa/nanopb/download/nanopb-0.2.8.tar.gz
      2 Version: 0.2.8
      3 BugComponent: 31808
      4