Enable RTT

Hi ,

I have a basic project with Hello World project , NCS 2.8.0.

To enable RTT I've added to prj.conf the following 

CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_UART_CONSOLE=n
When connecting RTT terminal I can see the following 
EGGER J-Link V7.94i - Real time terminal output
SEGGER J-Link (unknown) V1.0, SN=1050285706
Process: JLink.exe
Why I can't see - Hello World!
When connecting COM port (after disabling all prj.conf lines above) it show 
*** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***
*** Using Zephyr OS v3.7.99-0bc3393fb112 ***
Hello World! nrf52840dk/nrf52840
What's wrong with RTT Terminal view ?
Tnx,
Eran.
Parents
  • Hi, the hello_world sample uses printf(), which AFAIK is redirected to the UART console.

    • What happens if you replace printf() with printk()? In order to do so, you must include <zephyr/sys/printk.h>
    • Other config that may be required to be set is CONFIG_RTT_CONSOLE
    • If that is not enough, you may also need to add CONFIG_LOG_PRINTK to redirect printk messages to the logging subsystem (which I don't think so because you're not using the log subsystem)
    • Finally, maybe CONFIG_STDOUT_CONSOLE with CONFIG_RTT_CONSOLE may allow printf calls to be redirected to RTT, but I'm not sure.

    Hope this helps.

Reply
  • Hi, the hello_world sample uses printf(), which AFAIK is redirected to the UART console.

    • What happens if you replace printf() with printk()? In order to do so, you must include <zephyr/sys/printk.h>
    • Other config that may be required to be set is CONFIG_RTT_CONSOLE
    • If that is not enough, you may also need to add CONFIG_LOG_PRINTK to redirect printk messages to the logging subsystem (which I don't think so because you're not using the log subsystem)
    • Finally, maybe CONFIG_STDOUT_CONSOLE with CONFIG_RTT_CONSOLE may allow printf calls to be redirected to RTT, but I'm not sure.

    Hope this helps.

Children
No Data
Related