apps/agl-service-can-low-level.git
7 years agoMerge pull request #237 from wak-google/fix-build
Petteri Aimonen [Wed, 18 Jan 2017 07:02:28 +0000 (09:02 +0200)]
Merge pull request #237 from wak-google/fix-build

WIP: cmake cleanup to support installable host tooling

7 years agoMerge pull request #236 from wak-google/fix-lib
Petteri Aimonen [Wed, 18 Jan 2017 07:00:38 +0000 (09:00 +0200)]
Merge pull request #236 from wak-google/fix-lib

cmake: Fix library name

7 years agocmake: Cleanup the build so that host and runtime tooling is installable
William A. Kennington III [Wed, 18 Jan 2017 01:22:06 +0000 (17:22 -0800)]
cmake: Cleanup the build so that host and runtime tooling is installable

Signed-off-by: William A. Kennington III <wak@google.com>
7 years agocmake: Fix library name
William A. Kennington III [Tue, 17 Jan 2017 20:58:48 +0000 (12:58 -0800)]
cmake: Fix library name

The produced static library should be `libprotobuf-nanopb.a`
instead of the current `liblibprotobuf-nanopb.a`.

Signed-off-by: William A. Kennington III <wak@google.com>
7 years agoMerge pull request #230 from Tobba/nonempty-substring
Petteri Aimonen [Thu, 12 Jan 2017 18:00:28 +0000 (20:00 +0200)]
Merge pull request #230 from Tobba/nonempty-substring

Fix closing a non-empty substream resulting in an incorrect stream state

7 years agoFix closing a non-empty substream resulting in an incorrect stream state
Tobba [Wed, 21 Dec 2016 20:02:53 +0000 (21:02 +0100)]
Fix closing a non-empty substream resulting in an incorrect stream state

7 years agoMerge branch 'master' of github.com:nanopb/nanopb
Petteri Aimonen [Sat, 31 Dec 2016 08:42:59 +0000 (10:42 +0200)]
Merge branch 'master' of github.com:nanopb/nanopb

7 years agoFix multiple oneofs in same message (issue #229)
Petteri Aimonen [Sat, 31 Dec 2016 08:33:48 +0000 (10:33 +0200)]
Fix multiple oneofs in same message (issue #229)

Previously the field iterator logic didn't know whether two
oneof fields were part of the same union, or separate. This
caused wrong pointers to be calculated if multiple oneofs were
inside a single message.

This commit fixes this by using dataoffset of PB_SIZE_MAX to
indicate union fields after the first field.

Theoretically PB_SIZE_MAX is also a valid value for data offset,
which could cause errors. Adding a compile-time assert for this
is somewhat difficult. However I consider it extremely unlikely
that there is any platform that could trigger this situation, as
it would require 255 bytes of extra data/padding between two protobuf
oneof fields. On 64-bit architectures the worst case is 16 bytes,
and even esoteric platforms only align to 64 bytes or so. Manual
modification of the generated .pb.h file could trigger this, but
even then it would require pretty bad luck to happen.

7 years agoAdd testcase for issue #229
Petteri Aimonen [Sat, 31 Dec 2016 08:33:19 +0000 (10:33 +0200)]
Add testcase for issue #229

7 years agoUpdate readme
Petteri Aimonen [Fri, 23 Dec 2016 19:09:09 +0000 (21:09 +0200)]
Update readme

7 years agoMerge pull request #231 from Tobba/expose-varint32
Petteri Aimonen [Fri, 23 Dec 2016 18:46:06 +0000 (20:46 +0200)]
Merge pull request #231 from Tobba/expose-varint32

Make pb_decode_varint32 public API

7 years agoMake pb_decode_varint32 public API
Tobba [Wed, 21 Dec 2016 15:51:47 +0000 (16:51 +0100)]
Make pb_decode_varint32 public API

7 years agoAllow overriding proto3 mode (#228)
Petteri Aimonen [Thu, 22 Dec 2016 15:37:14 +0000 (17:37 +0200)]
Allow overriding proto3 mode (#228)

7 years agoEnable clang integer sanitizer and clean up a few warnings.
Petteri Aimonen [Fri, 9 Dec 2016 16:57:08 +0000 (18:57 +0200)]
Enable clang integer sanitizer and clean up a few warnings.

Changed to use simple indexing instead of while (count--) in buf_read()/buf_write(),
because the count overflowed from 0 to max on the last iteration. While the unsigned
integer overflow is defined and behaviour was correct, making this simple change
allowed enabling the sanitizer which might catch true errors elsewhere in the code.

7 years agoMerge branch 'kurddt-fix_unalign' (issues #226, #227)
Petteri Aimonen [Fri, 9 Dec 2016 16:50:31 +0000 (18:50 +0200)]
Merge branch 'kurddt-fix_unalign' (issues #226, #227)

7 years agoAdd regression test for issue #227
Petteri Aimonen [Fri, 9 Dec 2016 16:50:20 +0000 (18:50 +0200)]
Add regression test for issue #227

7 years agoRefactor proto3 logic into pb_check_proto3_default_value()
Petteri Aimonen [Fri, 9 Dec 2016 16:37:55 +0000 (18:37 +0200)]
Refactor proto3 logic into pb_check_proto3_default_value()

Mainly to clean up the code. Also fixed handling of
PB_LTYPE_FIXED_LENGTH_BYTES for proto3 files.

7 years agoFix potential unaligned access
Guillaume Lager [Fri, 9 Dec 2016 09:02:08 +0000 (10:02 +0100)]
Fix potential unaligned access

If the type is string, do not try to deference it as int16, int32 or int64.
This may lead to unalign memory access, which may cause trap on some architectures (ARM)

7 years agoMerge branch 'wak-google-upstream1' (#223)
Petteri Aimonen [Tue, 22 Nov 2016 15:25:24 +0000 (17:25 +0200)]
Merge branch 'wak-google-upstream1' (#223)

7 years agoTest case for enum_to_string
Petteri Aimonen [Tue, 22 Nov 2016 15:25:00 +0000 (17:25 +0200)]
Test case for enum_to_string

7 years agoSmall indentation and naming fixes to enum_to_string functionality
Petteri Aimonen [Tue, 22 Nov 2016 15:24:33 +0000 (17:24 +0200)]
Small indentation and naming fixes to enum_to_string functionality

7 years agonanopb: update generator to emit optional enum->string mapping function
William A. Kennington III [Wed, 26 Oct 2016 20:55:44 +0000 (13:55 -0700)]
nanopb: update generator to emit optional enum->string mapping function

Google-Bug-Id: 28000875
Signed-off-by: William A. Kennington III <wak@google.com>
Change-Id: I1bffd39168abe04593588291b0ebbe5199a00138

7 years agoInclude version number in PlatformIO library.json (issue 222)
Petteri Aimonen [Sat, 19 Nov 2016 05:36:21 +0000 (07:36 +0200)]
Include version number in PlatformIO library.json (issue 222)

7 years agoChange download links to https
Petteri Aimonen [Sun, 30 Oct 2016 06:14:03 +0000 (08:14 +0200)]
Change download links to https

7 years agoSetting version to 0.3.8-dev
Petteri Aimonen [Sun, 30 Oct 2016 06:13:46 +0000 (08:13 +0200)]
Setting version to 0.3.8-dev

7 years agoPublishing nanopb-0.3.7
Petteri Aimonen [Sun, 30 Oct 2016 05:30:49 +0000 (07:30 +0200)]
Publishing nanopb-0.3.7

7 years agoNote about protoc update
Petteri Aimonen [Mon, 24 Oct 2016 10:12:52 +0000 (13:12 +0300)]
Note about protoc update

7 years agoBuild fix for previous commit
Petteri Aimonen [Mon, 24 Oct 2016 09:35:59 +0000 (12:35 +0300)]
Build fix for previous commit

7 years agoBuild fix for previous commit
Petteri Aimonen [Mon, 24 Oct 2016 09:30:21 +0000 (12:30 +0300)]
Build fix for previous commit

7 years agoStrip debug symbols from linux library files
Petteri Aimonen [Mon, 24 Oct 2016 09:26:55 +0000 (12:26 +0300)]
Strip debug symbols from linux library files

7 years agoOnly run alltypes_proto3 test case if protoc version is new enough
Petteri Aimonen [Sun, 23 Oct 2016 15:40:50 +0000 (18:40 +0300)]
Only run alltypes_proto3 test case if protoc version is new enough

7 years agoUpdate changelog and authors list
Petteri Aimonen [Sun, 23 Oct 2016 15:01:20 +0000 (18:01 +0300)]
Update changelog and authors list

7 years agoAdd test cases for proto3 has_ field support.
Petteri Aimonen [Sun, 23 Oct 2016 11:43:59 +0000 (14:43 +0300)]
Add test cases for proto3 has_ field support.

7 years agoSet the proto3 option by default if file specifies proto3 syntax
Petteri Aimonen [Sun, 23 Oct 2016 11:43:24 +0000 (14:43 +0300)]
Set the proto3 option by default if file specifies proto3 syntax

7 years agoFix missing warning with large bytes fields (issue #220)
Petteri Aimonen [Sun, 23 Oct 2016 11:01:10 +0000 (14:01 +0300)]
Fix missing warning with large bytes fields (issue #220)

Need to generate compile time check if the bytes field + size field
might exceed 255 bytes. Also eliminated spurious checks generated
for some callback fields.

7 years agoMerge pull request #218 from berni155/master
Petteri Aimonen [Tue, 11 Oct 2016 05:12:38 +0000 (08:12 +0300)]
Merge pull request #218 from berni155/master

Fix typo in encoding

7 years agoFix typo in encoding
berni155 [Mon, 10 Oct 2016 19:53:53 +0000 (21:53 +0200)]
Fix typo in encoding

7 years agoMerge pull request #208 from podsvirov/topic-cmake-project
Petteri Aimonen [Mon, 10 Oct 2016 04:25:35 +0000 (07:25 +0300)]
Merge pull request #208 from podsvirov/topic-cmake-project

Added CMake project

7 years agoMerge pull request #216 from berni155/proto3_singular_fields_support
Petteri Aimonen [Mon, 10 Oct 2016 04:20:49 +0000 (07:20 +0300)]
Merge pull request #216 from berni155/proto3_singular_fields_support

Proto3 singular fields support

7 years agoPrevent fields with default value from encoding when proto3 option is set
Bernhard Krämer [Sun, 9 Oct 2016 18:27:28 +0000 (20:27 +0200)]
Prevent fields with default value from encoding when proto3 option is set

7 years agoAdd proto3 option to handle singular fields
Bernhard Krämer [Sun, 9 Oct 2016 18:26:28 +0000 (20:26 +0200)]
Add proto3 option to handle singular fields

7 years agoFix typo in docs (thanks to @alecdavis)
Petteri Aimonen [Fri, 2 Sep 2016 04:21:24 +0000 (07:21 +0300)]
Fix typo in docs (thanks to @alecdavis)

7 years agoMerge pull request #213 from PiotrSikora/export_license
Petteri Aimonen [Wed, 10 Aug 2016 08:41:09 +0000 (11:41 +0300)]
Merge pull request #213 from PiotrSikora/export_license

Bazel: export LICENSE.txt file.

7 years agoBazel: export LICENSE.txt file.
Piotr Sikora [Wed, 10 Aug 2016 08:27:20 +0000 (01:27 -0700)]
Bazel: export LICENSE.txt file.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
7 years agoFix formatting error in docs
Petteri Aimonen [Sat, 6 Aug 2016 07:42:04 +0000 (10:42 +0300)]
Fix formatting error in docs

7 years agoMerge pull request #211 from tmroeder/feat-inline-bytes
Petteri Aimonen [Fri, 5 Aug 2016 04:38:53 +0000 (07:38 +0300)]
Merge pull request #211 from tmroeder/feat-inline-bytes

Add inline allocation of bytes fields

7 years agoAdd inline allocation of bytes fields
Tom Roeder [Tue, 2 Aug 2016 21:57:37 +0000 (14:57 -0700)]
Add inline allocation of bytes fields

This commit adds a new FT_INLINE allocation type that forces bytes
fields to be inlined into the struct. E.g., pb_byte_t my_bytes[32].
This requires max_size for the bytes field. The FT_INLINE type is
represented as a new LTYPE: FT_LTYPE_FIXED_LENGTH_BYTES.

This commit also updates the documentation with FT_INLINE and
FT_LTYPE_FIXED_LENGTH_BYTES.

Added an AUTHORS file in apparent order of appearance in the git log
history from $(git log --all).

7 years agoMerge pull request #209 from LuminateWireless/bazel-build
Petteri Aimonen [Wed, 3 Aug 2016 06:13:26 +0000 (09:13 +0300)]
Merge pull request #209 from LuminateWireless/bazel-build

Add bazel BUILD file for nanopb.

7 years agoAdd bazel BUILD file for nanopb.
Ming Zhao [Mon, 1 Aug 2016 19:26:37 +0000 (12:26 -0700)]
Add bazel BUILD file for nanopb.

7 years agoAdded CMake project
Konstantin Podsvirov [Tue, 26 Jul 2016 20:33:33 +0000 (23:33 +0300)]
Added CMake project

7 years agoInclude package name in include guard (issue #207).
Petteri Aimonen [Sat, 23 Jul 2016 17:24:54 +0000 (20:24 +0300)]
Include package name in include guard (issue #207).

Fix suggested by Ulenspiegel.

Also added testcase for the same.

8 years agoSetting version to 0.3.7-dev
Petteri Aimonen [Sun, 19 Jun 2016 07:54:26 +0000 (10:54 +0300)]
Setting version to 0.3.7-dev

8 years agoPublishing nanopb-0.3.6
Petteri Aimonen [Sun, 19 Jun 2016 07:18:03 +0000 (10:18 +0300)]
Publishing nanopb-0.3.6

8 years agoUpdate changelog
Petteri Aimonen [Tue, 14 Jun 2016 15:34:44 +0000 (18:34 +0300)]
Update changelog

8 years agoClarify security model with regard to pointer _count fields.
Petteri Aimonen [Mon, 6 Jun 2016 18:07:28 +0000 (21:07 +0300)]
Clarify security model with regard to pointer _count fields.

8 years agoProtect against corrupted _count fields in pb_release().
Petteri Aimonen [Mon, 6 Jun 2016 18:01:22 +0000 (21:01 +0300)]
Protect against corrupted _count fields in pb_release().

Fixes a potential security issue (#205). Only relevant if the user
code writes untrusted data to _count fields, but this is allowed as
per the security model.

8 years agoAdd testcase for issue #205
Petteri Aimonen [Mon, 6 Jun 2016 18:00:59 +0000 (21:00 +0300)]
Add testcase for issue #205

8 years agoAdd static repeated submessage field to mem_release test case.
Petteri Aimonen [Mon, 6 Jun 2016 16:33:05 +0000 (19:33 +0300)]
Add static repeated submessage field to mem_release test case.

Attempt at reproducing issue #204.

8 years agoSmall updates to docs
Petteri Aimonen [Wed, 25 May 2016 15:08:49 +0000 (18:08 +0300)]
Small updates to docs

8 years agoFix error in STATIC_ASSERT with multiple files (issue #203)
Petteri Aimonen [Wed, 25 May 2016 15:03:33 +0000 (18:03 +0300)]
Fix error in STATIC_ASSERT with multiple files (issue #203)

The FieldMaxSize class was reusing the same list instance,
causing problems when multiple files were specified on the
protoc command line.

8 years agoAdd testcase for issue #203
Petteri Aimonen [Wed, 25 May 2016 14:58:01 +0000 (17:58 +0300)]
Add testcase for issue #203

8 years agoMerge pull request #201 from yanivmo/patch-1
Petteri Aimonen [Thu, 5 May 2016 15:33:13 +0000 (18:33 +0300)]
Merge pull request #201 from yanivmo/patch-1

Added explanation of `oneof` section usage

8 years agoAdded explanation of `oneof` section usage
Yaniv Mordekhay [Thu, 5 May 2016 14:52:19 +0000 (17:52 +0300)]
Added explanation of `oneof` section usage

8 years agoFix formatting in docs
Petteri Aimonen [Thu, 10 Mar 2016 14:49:53 +0000 (16:49 +0200)]
Fix formatting in docs

8 years agoSome more docs updates
Petteri Aimonen [Mon, 7 Mar 2016 16:03:09 +0000 (18:03 +0200)]
Some more docs updates

8 years agoMerge pull request #196 from mxk/api-ref
Petteri Aimonen [Mon, 7 Mar 2016 15:56:43 +0000 (17:56 +0200)]
Merge pull request #196 from mxk/api-ref

Update API reference to match headers

8 years agoUpdate API reference to match headers
Maxim Khitrov [Mon, 7 Mar 2016 13:15:03 +0000 (08:15 -0500)]
Update API reference to match headers

Update typedefs and function prototypes in the API reference to match
header files. Delete documentation for pb_skip_varint/pb_skip_string,
which are superseded by pb_skip_field, and add pb_get_encoded_size.

8 years agoProvide comments about uncalculable message sizes (issue #195)
Petteri Aimonen [Fri, 4 Mar 2016 15:38:47 +0000 (17:38 +0200)]
Provide comments about uncalculable message sizes (issue #195)

8 years agoMerge pull request #194 from isotes/master
Petteri Aimonen [Sat, 20 Feb 2016 14:17:51 +0000 (16:17 +0200)]
Merge pull request #194 from isotes/master

Generate MIN/MAX/ARRAYSIZE for enums

8 years agoMerge pull request #193 from recursify/master
Petteri Aimonen [Sat, 20 Feb 2016 09:26:00 +0000 (11:26 +0200)]
Merge pull request #193 from recursify/master

Add -D option to specify output directory

8 years agoGenerate MIN/MAX/ARRAYSIZE for enums
isotes [Fri, 19 Feb 2016 22:51:00 +0000 (23:51 +0100)]
Generate MIN/MAX/ARRAYSIZE for enums

This generates #defines mirroring the following values from the generated C++ code of GPB
* const Foo Foo_MIN: the smallest valid value of the enum (VALUE_A in the example).
* const Foo Foo_MAX: the largest valid value of the enum (VALUE_C in the example).
* const Foo Foo_ARRAYSIZE: always defined as Foo_MAX + 1.

8 years agoAdd -D option to specify output directory
Kenshi Kawaguchi [Fri, 19 Feb 2016 22:28:55 +0000 (14:28 -0800)]
Add -D option to specify output directory

8 years agoSetting version to 0.3.6-dev
Petteri Aimonen [Sat, 13 Feb 2016 10:51:44 +0000 (12:51 +0200)]
Setting version to 0.3.6-dev

8 years agoPublishing nanopb-0.3.5
Petteri Aimonen [Sat, 13 Feb 2016 10:39:45 +0000 (12:39 +0200)]
Publishing nanopb-0.3.5

8 years agoUpdate pb_release docs
Petteri Aimonen [Sun, 7 Feb 2016 08:50:02 +0000 (10:50 +0200)]
Update pb_release docs

8 years agoUpdate changelog
Petteri Aimonen [Sat, 6 Feb 2016 12:28:33 +0000 (14:28 +0200)]
Update changelog

8 years agoAdd code generator insertion points to files (#178).
Petteri Aimonen [Sat, 6 Feb 2016 11:57:38 +0000 (13:57 +0200)]
Add code generator insertion points to files (#178).

8 years agoFix a few remaining bugs related to CHAR_BIT!=8 platforms.
Petteri Aimonen [Wed, 27 Jan 2016 16:59:54 +0000 (18:59 +0200)]
Fix a few remaining bugs related to CHAR_BIT!=8 platforms.

8 years agoRemove obsolete __BIG_ENDIAN__ compilation option.
Petteri Aimonen [Wed, 27 Jan 2016 16:59:54 +0000 (18:59 +0200)]
Remove obsolete __BIG_ENDIAN__ compilation option.

This is now handled automatically using shift operations.

8 years agoAdd note to migration doc
Petteri Aimonen [Wed, 27 Jan 2016 16:59:02 +0000 (18:59 +0200)]
Add note to migration doc

8 years agoReplace uint8_t with a pb_byte_t typedef.
Petteri Aimonen [Wed, 27 Jan 2016 16:53:26 +0000 (18:53 +0200)]
Replace uint8_t with a pb_byte_t typedef.

This supports platforms where uint8_t does not exist.
If you are using a custom pb_syshdr.h, this may require adding
definitions for uint_least8_t etc.

8 years agoModify the int size STATIC_ASSERTS to work with CHAR_BITS!=8.
Petteri Aimonen [Wed, 27 Jan 2016 16:24:33 +0000 (18:24 +0200)]
Modify the int size STATIC_ASSERTS to work with CHAR_BITS!=8.

This will still catch the most common bug of long int vs. long long int.
The uint8_t checks do not seem necessary, test for this will be added
in later commit.

8 years agoGet rid of type punning in pb_encode_fixedXX().
Petteri Aimonen [Tue, 26 Jan 2016 20:10:09 +0000 (22:10 +0200)]
Get rid of type punning in pb_encode_fixedXX().

This was never very clean code, but it was fast. Hopefully
compilers are smart enough to optimize it away, or the speed
difference is not very large. This should be checked.

However working code is always more important than fast code,
and the previous way couldn't really work for platforms that
do not have byte-sized memory access. Related to PR #191.

8 years agoMerge pull request #190 from aeruder/master
Petteri Aimonen [Wed, 16 Dec 2015 14:39:30 +0000 (16:39 +0200)]
Merge pull request #190 from aeruder/master

pb_istream_from_buffer: add const to prototype

8 years agopb_istream_from_buffer: add const to prototype
Andrew Ruder [Wed, 16 Dec 2015 14:13:55 +0000 (08:13 -0600)]
pb_istream_from_buffer: add const to prototype

This commit changes the prototype for pb_istream_from_buffer from:
  pb_istream_t pb_istream_from_buffer(uint8_t *buf, size_t bufsize);
to
  pb_istream_t pb_istream_from_buffer(const uint8_t *buf, size_t bufsize);

This allows pb_istream_from_buffer users to point to const buffers
without having to inspect code (to ensure practical const-ness) and then be
forced to manually cast away const.

In order to not break compatibility with existing programs (by
introducing a const/non-const union in the pb_istream_t state) we simply
cast away the const in pb_istream_from_buffer and re-apply it when
possible in the callbacks.  Unfortunately we lose any compiler help in
the callbacks to ensure we are treating the buffer as const but manual
inspection is easy enough.

8 years agoFix mistake in previous commit
Petteri Aimonen [Sat, 21 Nov 2015 07:47:29 +0000 (09:47 +0200)]
Fix mistake in previous commit

8 years agoFix generator crash with Enum inside Oneof (issue #188).
Petteri Aimonen [Fri, 20 Nov 2015 21:57:37 +0000 (23:57 +0200)]
Fix generator crash with Enum inside Oneof (issue #188).

Add testcase for the same.

8 years agoSecond fix for -pedantic build issue in tests
Petteri Aimonen [Sun, 15 Nov 2015 07:26:10 +0000 (09:26 +0200)]
Second fix for -pedantic build issue in tests

8 years agoFix -Wno-pedantic on old GCC
Petteri Aimonen [Sat, 14 Nov 2015 20:37:54 +0000 (22:37 +0200)]
Fix -Wno-pedantic on old GCC

8 years agoAdd testcase for anonymous unions + few fixes.
Petteri Aimonen [Sat, 14 Nov 2015 20:23:48 +0000 (22:23 +0200)]
Add testcase for anonymous unions + few fixes.

Fixes compilation error with anonymous unions when
it is not the last field in message. Also fixes
extraneous newlines in header file. Cleanup the
pb.h extraneous use of ##.

8 years agoAdd option to allow for anonymous unions
Benjamin Kamath [Thu, 5 Nov 2015 00:42:25 +0000 (16:42 -0800)]
Add option to allow for anonymous unions

8 years agoIgnore null pointers in pb_release() (issue #183).
Petteri Aimonen [Sun, 25 Oct 2015 16:07:23 +0000 (18:07 +0200)]
Ignore null pointers in pb_release() (issue #183).

8 years agoAdd contributing.md to provide issue templates on github
Petteri Aimonen [Sat, 24 Oct 2015 19:20:39 +0000 (22:20 +0300)]
Add contributing.md to provide issue templates on github

8 years agoMerge pull request #181 from kylemanna/cmake
Petteri Aimonen [Sat, 17 Oct 2015 07:19:40 +0000 (10:19 +0300)]
Merge pull request #181 from kylemanna/cmake

Cmake updates

8 years agoexamples: cmake_simple: Use auto discovered path
Kyle Manna [Thu, 15 Oct 2015 20:57:37 +0000 (13:57 -0700)]
examples: cmake_simple: Use auto discovered path

* No need to specify the src path and the module path. Let cmake do it.

8 years agocmake: Auto discover NANOPB_SRC_ROOT_FOLDER
Kyle Manna [Thu, 15 Oct 2015 20:56:20 +0000 (13:56 -0700)]
cmake: Auto discover NANOPB_SRC_ROOT_FOLDER

* Use CMAKE_CURRENT_LIST_DIR to learn the path of the currently running
  file to determine location of NanoPB.
* Simplifies use in other projects.

8 years agocmake: Build generator files in build directory
Kyle Manna [Thu, 15 Oct 2015 20:04:23 +0000 (13:04 -0700)]
cmake: Build generator files in build directory

Treat the source directory as immutable.  Copy the generator directory
which previously generated files in-tree to the build directory and
then generate files.

Many emerging continuous integration build systems test builds across
multiple versions of dependencies protobuf and python versions in
particular.  The previous source tree builds resulted in stale files
from the last build breaking the current build.  By placing the build
files in the build directory, the build system automatically removes
stale files (removes output build directory) and regenerates them as
necessary.

8 years agoMerge pull request #176 from kylemanna/whitespace
Petteri Aimonen [Thu, 8 Oct 2015 15:23:32 +0000 (18:23 +0300)]
Merge pull request #176 from kylemanna/whitespace

generator: Remove trailing whitespace

8 years agogenerator: Remove trailing whitespace
Kyle Manna [Thu, 8 Oct 2015 01:16:36 +0000 (18:16 -0700)]
generator: Remove trailing whitespace

* Remove trailing whitespace
* No functional changes

8 years agoFix regression in generating message size defines (issue #172).
Petteri Aimonen [Mon, 5 Oct 2015 13:01:53 +0000 (16:01 +0300)]
Fix regression in generating message size defines (issue #172).

This bug was triggered when:
1. A .proto file included another .proto from a different directory.
2. The another .proto has an associated .options file.

Added regression test for the same.