This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to enable logging over UART?

I was trying to enable logging in the example project like blinky.

I've searched the Q&A in the forum but still have problem seeing the logs, the strange thing is that I am able to see the log output without changing anything from bsp example project (in examples\peripheral\bsp) but I couldn't enable the logging in blinky project.

I assume that I only need to modify the sdk_config.h then it should work, correct??

attachment is my sdk_config.h, please help suggest what steps are needed to enable logging, thank!

Parents
  • Hi Chris, 

    Search for "NRF_LOG_BACKEND" (in examples\peripheral\bsp sdk_config.h) There are two possible defines there. UART or RTT, and they are set to either 0 or 1.

    If NRF_LOG_BACKEND_UART_ENABLED is enabled, it should be printed over the UART, which is picked up by the programming chip on the DK, and you can view it using e.g. Termite, or Putty.

    If NRF_LOG_BACKEND_RTT_ENABLED is enabled, then you can see the log with the Segger debugger and JLink RTT Viewer.

    -Amanda H.

Reply
  • Hi Chris, 

    Search for "NRF_LOG_BACKEND" (in examples\peripheral\bsp sdk_config.h) There are two possible defines there. UART or RTT, and they are set to either 0 or 1.

    If NRF_LOG_BACKEND_UART_ENABLED is enabled, it should be printed over the UART, which is picked up by the programming chip on the DK, and you can view it using e.g. Termite, or Putty.

    If NRF_LOG_BACKEND_RTT_ENABLED is enabled, then you can see the log with the Segger debugger and JLink RTT Viewer.

    -Amanda H.

Children
No Data
Related