-
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
logging: backend: uart: improve compatibility, increase test coverage and minor ROM optimizations #65150
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated the `LBU_DEFINE` so that the index is appended only when given to improve backward compatibility. When it is depending on the `zephyr,console` node, the backend is defined as `log_backend_uart`. When it is depending on the new `zephyr,log-uart` node, the backend is defined as `log_backend_uart0`, `log_backend_uart1`, and so on. Updated the names of the internal variables to follow the same naming convention. Signed-off-by: Yong Cong Sin <[email protected]>
ycsin
added
bug
The issue is a bug, or the PR is fixing a bug
Regression
Something, which was working, does not anymore
Hotfix
Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc.
Trivial
Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
labels
Nov 14, 2023
The test should work on any boards with UART console, so increase the test coverage by adding `CONFIG_UART_CONSOLE` filter and using `qemu_x86` as `integration_platforms` instead of `platform_allow`. Signed-off-by: Yong Cong Sin <[email protected]>
ycsin
changed the title
logging: backend: uart: append index conditionally for compatibility
logging: backend: uart: append index conditionally for better compatibility
Nov 14, 2023
Rename the `device` variable in the `struct lbu_cb_ctx` to `uart_dev`, as it is a convention in Zephyr to not have the struct variable name after the struct. Signed-off-by: Yong Cong Sin <[email protected]>
Compile the `uart_dev` pointer only when necessary (when `zephyr,log-uart` is used), this saves 4 bytes in 32-bit systems and 8 bytes in 64-bit systems. Signed-off-by: Yong Cong Sin <[email protected]>
ycsin
changed the title
logging: backend: uart: append index conditionally for better compatibility
logging: backend: uart: improve compatibility, increase test coverage and minor ROM optimizations
Nov 14, 2023
Both |
cfriedt
approved these changes
Nov 14, 2023
nordicjm
approved these changes
Nov 14, 2023
nordic-krch
approved these changes
Nov 14, 2023
jhedberg
approved these changes
Nov 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Logging
bug
The issue is a bug, or the PR is fixing a bug
Hotfix
Fix for issues blocking development, i.e. CI issues, tests failing in CI, etc.
Regression
Something, which was working, does not anymore
Trivial
Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
subsys/logging/log_backend_uart
.log_backend_uart
to save 1 pointer size in ROM.struct device *device
tostruct device *uart_dev
fixes #65151
__