summaryrefslogtreecommitdiffstats
path: root/generator
AgeCommit message (Collapse)AuthorFilesLines
2013-12-29Fix protoc-gen-nanopb when the path contains spacesPetteri Aimonen1-1/+2
2013-12-29Fixes for pyinstallerPetteri Aimonen1-0/+7
2013-12-29Make generator print errors to stderr.Petteri Aimonen1-12/+14
Otherwise they won't be visible when run as a protoc plugin.
2013-12-29Windows build fixesPetteri Aimonen1-0/+1
2013-12-29Rework the Makefiles to be compatible with binary packages.Petteri Aimonen3-5/+35
2013-12-29Add build script for windows packagePetteri Aimonen2-19/+13
2013-12-29Add descriptor.proto to repository to avoid messing with protoc include path.Petteri Aimonen4-4/+624
2013-12-29Move the generator .proto files to a subdir, and get rid of precompiled ↵Petteri Aimonen7-326/+4
versions.
2013-12-29Organize allocation logic in generator, add pb_bytes_ptr_t.Petteri Aimonen1-45/+42
Allocation decision is now made before the field data type is decided. This way the data type decisions can more cleanly account for the allocation type, i.e. FT_DEFAULT logic etc. Added pb_bytes_ptr_t for pointer-allocated bytes-fields. There is no point generating separate structs for these, as they would all be of the same type.
2013-12-29Generating and encoding messages with dynamic allocaitonMartin Donath3-22/+54
2013-12-22Negative int32 values take 10 bytes now.Petteri Aimonen1-1/+1
2013-11-07Setting version to 0.2.5-devPetteri Aimonen1-1/+1
2013-11-07Publishing nanopb-0.2.4Petteri Aimonen1-1/+1
2013-11-02Generate #define tags for extension fields also.Petteri Aimonen1-0/+7
Update issue 93 Status: FixedInGit
2013-10-24Same fix for EncodedSize.__mul__Petteri Aimonen1-1/+1
2013-10-24Handle also longs in EncodedSizePetteri Aimonen1-1/+1
2013-10-23Fix the size of length prefix for messages in other files.Petteri Aimonen1-0/+5
2013-10-23Generate message size #defines also for messages defined in multiple files.Petteri Aimonen1-8/+50
Add testcase for the same.
2013-09-26Add #defines for the maximum encoded message size.Petteri Aimonen1-16/+95
Update issue 89 Status: FixedInGit
2013-09-18Setting version to 0.2.4-devPetteri Aimonen1-1/+1
2013-09-18Publishing nanopb-0.2.3Petteri Aimonen1-1/+1
2013-09-13Fine-tune the naming of new macros before merging into master.Petteri Aimonen1-1/+1
Requires re-generation of files generated with dev_get_rid_of_ternary_operator.
2013-09-11Get rid of the ternary operator in the pb_field_t initialization.Petteri Aimonen1-1/+2
Some compilers where unable to detect that the ternary operator can be evaluated at the compile time. This commit does the evaluation on the Python side, which should fix the problem. The new .pb.c files are generated using PB_FIELD2() macro. The old PB_FIELD() macro remains, so that previously generated files keep working.
2013-09-08Add support for running the nanopb generator as protoc plugin.Petteri Aimonen4-55/+419
Will be used to implement issue 47. For now, symlink nanopb_generator.py as protoc-gen-nanopb and use protoc --nanopb_out=. to call it.
2013-09-08Handle unsupported extension field types more gracefully.Petteri Aimonen1-5/+14
Previously the generator would stop with NotImplementedException as soon as a required or repeated extension field is found. New behaviour is to just ignore the unsupported field and note that in a comment in the generated file. Furthermore, allow skipping of extension fields using the generator option (nanopb).type = FT_IGNORE. Update issue 83 Status: FixedInGit
2013-08-18Setting version to 0.2.3-devPetteri Aimonen1-1/+1
2013-08-18Publishing nanopb-0.2.2Petteri Aimonen1-1/+1
2013-07-22Fix bugs in extension support when multiple extension fields are present.Petteri Aimonen1-3/+6
2013-07-17Extension support implemented for decoder.Petteri Aimonen1-4/+13
Testing is still needed. Also only 'optional' extension fields are supported now, 'repeated' fields are not yet supported.
2013-07-17Implement generator support for extension fields (no encoder/decoder support ↵Petteri Aimonen1-12/+85
yet)
2013-07-06Document the .options file usage.Petteri Aimonen1-0/+2
Also add note about the 'packed' message option being incompatible with CPUs that do not support unaligned access. Update issue 12 Status: FixedInGit Update issue 77 Status: FixedInGit
2013-06-03Include the field tags in the generated .pb.h file.Petteri Aimonen1-0/+11
Patch from Michael Haberler.
2013-04-14Setting version to 0.2.2-devPetteri Aimonen1-1/+1
2013-04-14Publishing nanopb-0.2.1Petteri Aimonen1-1/+1
2013-04-02Do not generate has_ fields for callback fields.Petteri Aimonen1-1/+1
The arg field can be used to store the field presence from inside the callback. Furthermore, having the has_ field for encoding callbacks would be more annoying than useful. Update issue 70 Status: FixedInGit
2013-03-13Add support for packed structures on IAR and MSVC.Petteri Aimonen1-0/+5
Update issue 66 Status: FixedInGit
2013-03-09Make the generator options accept a file name in addition to format string.Petteri Aimonen1-2/+10
2013-03-09Add simple support for separate options file.Petteri Aimonen2-33/+87
Update issue 12 Still needs documentation.
2013-03-06Add a dummy field if struct would otherwise be empty.Petteri Aimonen1-0/+6
Update issue 64 Status: FixedInGit
2013-03-04Add generator option to configure #include directives.Petteri Aimonen1-5/+14
This suits complex projects, where there are multiple interdependent .proto files in various directories. Patch by Michael Haberler.
2013-03-02Setting version to 0.2.1-devPetteri Aimonen1-1/+1
2013-03-02Publishing nanopb-0.2.0Petteri Aimonen1-1/+1
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