-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
west.yml: Update zcbor to 0.8.0 #67418
west.yml: Update zcbor to 0.8.0 #67418
Conversation
oyvindronningstad
commented
Jan 10, 2024
- Add support for unordered maps
- Performance improvements
- Naming improvements for generated code
- Bugfixes
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
9f7a43b
to
882114f
Compare
882114f
to
b1610a2
Compare
b1610a2
to
2d6295c
Compare
2d6295c
to
4e2c839
Compare
@@ -138,7 +138,8 @@ int os_mgmt_client_echo(struct os_mgmt_client *client, const char *echo_string) | |||
zcbor_new_encode_state(zse, ARRAY_SIZE(zse), nb->data + nb->len, net_buf_tailroom(nb), 0); | |||
|
|||
ok = zcbor_map_start_encode(zse, 2) && | |||
zcbor_tstr_put_lit(zse, "d") && zcbor_tstr_put_term(zse, echo_string) && | |||
zcbor_tstr_put_lit(zse, "d") && | |||
zcbor_tstr_put_term(zse, echo_string, CONFIG_ZCBOR_MAX_STR_LEN) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this isn't actually changing behaviour but kind of seems a bit wrong that this is implying that the pointer is (by default) 4096 bytes long?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nordicjm I agree. I managed to limit it to only be used in tests, and I changed it to be 256 instead of 4096. And I added help text discouraging its use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not check the code, but at least LwM2M interop tests against Leshan seem to pass. Verified that manually.
So I cannot see anything broken. OK from LwM2M point of view.
4e2c839
to
22c4853
Compare
2e2dbff
to
98aaa81
Compare
subsys/stats/stats.c
Outdated
if (strnlen(name, CONFIG_STATS_MAX_NAME_LEN) == CONFIG_STATS_MAX_NAME_LEN) { | ||
return -ENAMETOOLONG; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure on this? Seems like an MCUmgr limitation, don't see why it should apply to stats as a whole
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a sensible check on its own I'd say, but if we don't want to make any changes there, I could make a config in stat_mgmt/Kconfig instead, just for use when encoding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stats system has been in zephyr since version 1.11 so would prefer not to make possible breaking changes to it at this point unless they're fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, I think I found a good solution in stats_mgmt instead.
98aaa81
to
8bb48cc
Compare
@@ -32,6 +32,14 @@ config MCUMGR_GRP_STAT_MAX_NAME_LEN | |||
stat read commands. If a stat group's name exceeds this limit, it will | |||
be impossible to retrieve its values with a stat show command. | |||
|
|||
config MCUMGR_STAT_MAX_NAME_LEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must follow naming rule from top of file:
# Options defined in this file should be prefixed:
# MCUMGR_GRP_STAT_ -- general group options;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to reuse the existing config.
west.yml
Outdated
path: modules/lib/uoscore-uedhoc | ||
- name: zcbor | ||
revision: 67fd8bb88d3136738661fa8bb5f9989103f4599e | ||
revision: 0.8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to use a commit ID for this, not a tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
697982e
to
4ad5c63
Compare
Highlights of zcbor 0.8.0: - Add support for unordered maps - Performance improvements - Naming improvements for generated code - Bugfixes Update MCUboot and uoscore-uedhoc to bring in changes related to zcbor 0.8.0. Signed-off-by: Øyvind Rønningstad <[email protected]>
4ad5c63
to
3201361
Compare
If people are using the zcbor script for code generation, it needs to be at the latest version Signed-off-by: Øyvind Rønningstad <[email protected]>
For use with zcbor_tstr_put_term() which needs a maximum string length. Signed-off-by: Øyvind Rønningstad <[email protected]>
Regenerate from CDDL, update patch, fix references in code. Signed-off-by: Øyvind Rønningstad <[email protected]>
zcbor_new_state and zcbor_tstr_put_term Signed-off-by: Øyvind Rønningstad <[email protected]>
zcbor_new_state and zcbor_tstr_put_term Signed-off-by: Øyvind Rønningstad <[email protected]>
6450676
to
1755c66
Compare
doc/releases/migration-guide-3.6.rst
Outdated
For example: | ||
* Leading single underscores and all double underscores are largely gone, | ||
* Names sometimes gain suffixes like ``_m`` or ``_l`` for disambiguation. | ||
* All enum (choice) names have now gained a ``_c`` suffix, so the enum name no longer matches | ||
the corresponding member name exactly (because this broke C++ namespace rules). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should be:
For example: | |
* Leading single underscores and all double underscores are largely gone, | |
* Names sometimes gain suffixes like ``_m`` or ``_l`` for disambiguation. | |
* All enum (choice) names have now gained a ``_c`` suffix, so the enum name no longer matches | |
the corresponding member name exactly (because this broke C++ namespace rules). | |
For example: | |
* Leading single underscores and all double underscores are largely gone, | |
* Names sometimes gain suffixes like ``_m`` or ``_l`` for disambiguation. | |
* All enum (choice) names have now gained a ``_c`` suffix, so the enum name no longer matches | |
the corresponding member name exactly (because this broke C++ namespace rules). |
A short release note referring to the official release notes, and a migration guide with the most likely changes that need to be made. Signed-off-by: Øyvind Rønningstad <[email protected]>
adda9b4
1755c66
to
adda9b4
Compare
Thanks @de-nordic and @kartben, doc build fixed. |
been overhauled, so the code using the generated code must likely be changed. | ||
For example: | ||
|
||
* Leading single underscores and all double underscores are largely gone, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(only if another change is requested) replace comma with full stop