summaryrefslogtreecommitdiffstats
path: root/generator
AgeCommit message (Collapse)AuthorFilesLines
2013-02-28Add --extension option to generator.Petteri Aimonen1-5/+7
Patch courtesy of Michael Haberler.
2013-02-21Move STATIC_ASSERTs to .pb.c file.Petteri Aimonen1-22/+24
This way the .pb.h will remain cleaner and easier to read.
2013-02-17Reformat generated .pb.c files using macros.Petteri Aimonen1-86/+63
This has the following advantages: 1) Easier to modify pb_field_t encoding 2) Simpler generator logic 3) Tidier looking, easier to read .pb.c files Update issue 58 Status: FixedInGit
2013-02-11Set version to 0.2.0-devPetteri Aimonen1-1/+1
2013-02-07Add check for sizeof(double) == 8.Petteri Aimonen1-0/+15
Update issue 54 Status: FixedInGit
2013-02-07Sanitize filenames before putting them in #ifndef.Petteri Aimonen1-1/+11
Update issue 50 Status: FixedInGit
2013-02-05Add Java package name to nanopb.proto.Petteri Aimonen1-0/+2
This fixes problems when interoperating with Java. Fix suggested by trepidacious: https://groups.google.com/forum/#!topic/nanopb/hZgrj6h9OnY
2013-01-14Add field type FT_IGNORE to generator.Petteri Aimonen3-3/+15
This allows ignoring fields that are unnecessary or too large for an embedded system using nanopb, while allowing them to remain in the .proto for other platforms. Update issue 51 Status: FixedInGit
2013-01-10Add generator option for packed structs.Petteri Aimonen3-6/+22
Usage is: message Foo { option (nanopb_msgopt).packed_struct = true; ... } Valid also in file scope. Update issue 49 Status: FixedInGit
2013-01-10Cleanup: get rid of unnecessary spacesPetteri Aimonen1-6/+6
2012-12-13Setting version to 0.1.9-devPetteri Aimonen1-1/+1
2012-12-13Publishing nanopb-0.1.8Petteri Aimonen1-1/+1
2012-11-16Fix STATIC_ASSERT macro when using multiple .proto files.Steffen Siering1-2/+6
The __COUNTER__ macro (used for generating unique names) is at least supported by gcc, clang and Visual Studio. With this change test_compiles.c is compilable, since no more typedefs are redefined. Compilers/Preprocessors not supporting __COUNTER__ error's are still possible which are hopfully handled by the usage of __LINE__ in most sittuations. Added unit test for the problem.
2012-11-14Fix naming of nested Enums with short namesPetteri Aimonen1-3/+4
2012-11-14Fix naming of enums when long_names=false.Petteri Aimonen1-3/+18
Modify test case to check that options.pb.o compiles. Update issue 42 Status: FixedInGit Update issue 43 Status: FixedInGit
2012-11-11Setting version to 0.1.8-devPetteri Aimonen1-1/+1
2012-11-11Publishing nanopb-0.1.7Petteri Aimonen1-1/+1
2012-10-29Add nanopb version number to generated files.Petteri Aimonen1-1/+4
tools/set_version.sh is used to update the values. Update issue 36 Status: FixedInGit
2012-10-29Add extern "C" to header files.Petteri Aimonen1-1/+8
Update issue 35 Status: FixedInGit
2012-10-29Add option to use short names for enum values.Petteri Aimonen3-7/+45
Update issue 38 Status: FixedInGit
2012-10-29Allow defining field type in .proto.Petteri Aimonen3-8/+61
Update issue 30 Status: FixedInGit
2012-10-29Improve .proto options parsing.Petteri Aimonen3-21/+89
Options can now be defined on command line, file, message or in field scope. Update issue 12 Status: Started
2012-10-29Use optparse in nanopb_generator.pyPetteri Aimonen1-31/+85
2012-10-29Give names to generated structures to allow forward declaration.Petteri Aimonen1-2/+2
Update issue 39 Status: FixedInGit
2012-07-05Fix bug with .proto without messages (again), and add a test case for it.Petteri Aimonen1-9/+10
2012-07-05Replace #warning with the standard #error.Petteri Aimonen1-5/+2
2012-07-05Cast enum vaules to integers and cast them back where appropraiteStan Hu1-3/+3
to prevent mixed enumeration type compiler warnings
2012-07-01Replace PB_MANY_FIELDS with PB_FIELD_16BIT and PB_FIELD_32BIT.Petteri Aimonen1-26/+37
This allows more precise control over the memory use vs. field size.
2012-06-30Add PB_MANY_FIELDS option for supporting fields > 255.Petteri Aimonen1-0/+38
Add generator warning if this is necessary. Fixes issue #14.
2012-06-30Warn if PB_MAX_REQUIRED_FIELDS is not large enough.Petteri Aimonen1-0/+10
2012-06-20Fix error when .proto contains no Messages (e.g. just enums).Petteri Aimonen1-1/+1
Thanks to Paul Fertser for reporting this bug.
2012-06-12Add descriptor.proto into the #include exclusion listPetteri Aimonen1-1/+1
2012-05-19Add better error messages in the generator when libraries cannot be imported.Petteri Aimonen1-2/+22
Fixes issue #5.
2012-02-15Modified nanopb_generator.py to generate includes for other .proto files.Petteri Aimonen1-2/+12
Implementation was suggested by extremeblue99. Fixes issue 4.
2012-01-30Fixed nanopb_generator.py to read the input file in binary mode.Petteri Aimonen1-1/+1
2012-01-12Fixed issue 1 reported by Erik Rosen:Petteri Aimonen1-3/+0
The size of non-callback bytes-fields was miscalculated, which caused all following fields in a message to contain garbage. Previous commit contains a testcase for this. This fix changes the generated message description. If your protocol uses bytes-fields, you should regenerate *.pb.c.
2012-01-12Fixed a bug in the generator that caused a compiler error on sfixed32 and ↵Petteri Aimonen1-2/+2
sfixed64 fields.
2011-11-30Added Makefile for generating nanopb_pb2.py.Petteri Aimonen1-0/+2
I still left the precompiled version in place, as it "often works" :) git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1019 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-13Fixed a bunch of bugs related to callback fields.Petteri Aimonen1-4/+4
Most importantly, callback fields in submessages were being overwritten with garbage, causing segfaults. Additionally, converted PB_LTYPE_FIXED to PB_LTYPE_FIXED32 and PB_LTYPE_FIXED64. This makes the interface a bit easier to use, and in addition runs faster. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@975 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-01Python 2.6 compatibility for the generatorPetteri Aimonen1-4/+4
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@973 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24Generator bugfixesPetteri Aimonen1-24/+46
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@970 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23Changed autogenerated file naming from foo.c to foo.pb.cPetteri Aimonen1-3/+3
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@965 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23Allocated extension numberPetteri Aimonen2-4/+12
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@962 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-22unittests, change to PB_LTYPE_BYTES data sizePetteri Aimonen1-0/+3
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-17ExamplePetteri Aimonen1-4/+4
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@957 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-14More documentation, small improvementsPetteri Aimonen1-4/+4
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-04EncoderPetteri Aimonen1-29/+89
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@951 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-31First version of header generatorPetteri Aimonen3-0/+433
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@950 e3a754e5-d11d-0410-8d38-ebb782a927b9