Replies: 3 comments
|
This should be possible to have both the shell on RTT while having the console on a UART, this is a configuration issue. |
|
Suggestion of the top of my head: Then these default to That does just circumvent some the issue, and does not properly resolve it. |
|
The above setup is quite confusing, it suggests that you've managed to get two chosen consoles setup in some manner by involving the shell. And by doing so end up with printk trying to go to both and racing. In which case, the DT chosen node for the console should be winning. This could be a bug, but I don't think enough information is being provided here to replicate the issue. One way to show this is create a new case case and send a PR for this along with a fix. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Scenario:
User wants to use RTT as shell:
CONFIG_SHELL_BACKEND_RTT=y, furthermore, they wantprintkandLOG_***to pipe out over UART/SERIAL.Now, if
CONFIG_EARLY_CONSOLE=yis set, these two functions will run:zephyr/drivers/console/uart_console.c
Line 615 in 6085aad
zephyr/drivers/console/rtt_console.c
Line 89 in 6085aad
both in the end running:
__printk_hook_install(...Now, it sems that mechanisms such as Link Time Optimizations, will affect which of these run first. So, in some cases, printk ends up on RTT and in other situations on Serial/UART.
Steps to reproduce
Hard to reproduce, but the fact that these two commands are run with the same
SYS_INITcommand argument leads to this issue.Impact
Functional Limitation – Some features not working as expected, but system usable.
Additional Context
It is strange that RTT does
__printk_hook_install. It should be possible to pipe printk to serial, whilst outputting console information to RTT.All reactions