-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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: uart: get device from dedicated zephyr,log-uart
node
#65001
Conversation
04c078f
to
c7dca31
Compare
Add a new `zephyr,log-uart` chosen entry to be used by UART log backend later. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Change the chosen UART device from `console` to the dedicated `log-uart` node, and removed the dependency on `UART_CONSOLE`. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
c7dca31
to
8b2d621
Compare
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.
This change will break pretty much all board configurations.
Please state the nature of the problem this is solving.
Updated OP, this is required to have cleaner implementation in #64917 |
I don't think it should be necessary for all boards to switch. Many boards are fine simply using the existing zephyr,console, a singleton. For those who want multiple instances, the previous approach that I used was probably the least invasive; adding a child node with the Zephyr,log-uart compatible; the backing UART device is implicitly the parent of that node. It could also be added to any existing configuration without requiring a lot of change. |
Maybe use |
Exactly. The associated pr has changed a bit since I wrote it originally. I don't think we need a tree-wide change, but probably what is above (which I believe was @ycsin's original submission) would be fine. |
Changes the UART log backend to use a new dedicated
zephyr,log-uart
node instead of the chosenzephyr,console
node, just like thezephyr,shell-uart
.This helps with the development of cleaner multi-instance UART log backend implementation, see #64917.
Devicetree modified using the following command, with a few exceptions:
The compilation of the
log_backend_uart
now depends on having an enabled serial driver & chosenzephyr,log-uart
node in the devicetree instead ofUART_CONSOLE