Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nanopb: Add Kconfig/CMake for disabling size check #36

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/nanopb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ if(CONFIG_NANOPB)
PB_WITHOUT_64BIT
)

zephyr_compile_definitions_ifdef(
CONFIG_NANOPB_NO_ENCODE_SIZE_CHECK
PB_NO_ENCODE_SIZE_CHECK
)

zephyr_compile_definitions_ifdef(
CONFIG_NANOPB_ENCODE_ARRAYS_UNPACKED
PB_ENCODE_ARRAYS_UNPACKED
Expand Down
6 changes: 6 additions & 0 deletions modules/nanopb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ config NANOPB_WITHOUT_64BIT
Disable support of 64-bit integer fields, for old compilers or
for a slight speedup on 8-bit platforms.

config NANOPB_NO_ENCODE_SIZE_CHECK
bool "Disable size checks when encoding sub-messages"
help
Disable checking the size of encoded submessages between initial sizing
encoding and final encoding to the stream.

config NANOPB_ENCODE_ARRAYS_UNPACKED
bool "Encode arrays unpacked"
help
Expand Down
Loading