Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

NCS/9160: do I have to have uart0 as console?

I'm moving from NRF9160DK to a custom board, where it has no UART. I plan to just use RTT for debugging messages.

However, I found if I delete the section which defines uart0 in the nrf9160dk_nrf9160_common.dts file, I won't be able to see RTT output in the JLinkRTTViewer. Nor can I set the uart0 to "disabled", or comment out "chosen{ zephyr,console=&uart0}" at the top of the file. (I'm creating my own DTS file but so far it's just a copy of the nrf9160dk_nrf9160_common.dts)

In my prj.comf, I already has these:

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_LOG_MODE_IMMEDIATE=n
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_PROCESS_THREAD=y
CONFIG_LOG_BUFFER_SIZE=8192
CONFIG_LOG_FRONTEND=n
CONFIG_LOG_BACKEND_UART=n
# Segger RTT
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_LOG_BACKEND_RTT=y

It appears that setting the LOG_BACKENG to UART or RTT doesn't affect anything.

So currently I just set uart0 to use two spare pin as tx/rx so the project can compile. And I can see messages in the RTT viewer. I'm not sure what is wrong, or it has to be this way.

I'm using NCS 1.7.1.

Thanks for any help!

Related