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

NRF_LOG_INFO not displaying anything on RTT Viewer, nrf52840 custom board.

Hi All, 

I am working on a custom board using the BMD-340 from RIGADO, and I am hoping to be able to see all the logs on the RTT viewer. 

setup -> SDK 16.00, J-ling programmer using SWD interface, keil u vision 5, J-link RTT viewer V6.70. 

I was expecting to see all the NRF_LOG_INFO , ERRORS, WARNINGS etc specially because I want to know the memory RAM requirements by new services an characteristics that I will be adding to the BLE stack. However up until now it does not work, even though my application is running and doing what it is expect to do, I started by using the ble_app_hrs as a template and have included my own service and features. 

Relevant definitions in my sdk_config file :

1- #define NRF_LOG_BACKEND_RTT_ENABLED 1

2- #define NRF_LOG_ENABLED 1

3- #define NRF_LOG_DEFAULT_LEVEL 3

4-#define NRF_LOG_DEFERRED 1

While my application is running should I see all the logs on the RTT viewer ? or should I start a debug session ? 

Am I missing any definitions in order to get this working ? 

Any help on this would be highly appreciated ? 

Thanks 

Parents
  • 1- #define NRF_LOG_BACKEND_RTT_ENABLED 1

    check NRF_LOG_BACKEND_UART_ENABLED - that must be 0 (zero).

    While my application is running should I see all the logs on the RTT viewer ?

    You will see all enabled logs. Log level 3 disables NRF_LOG_DEBUG() messages.

    or should I start a debug session ? 

    If you run jlinkgdbserver concurrently, use the "Existing session" feature in RTT viewer. I like to use it this way because flashing new stuff is much faster just using the debugger.

    4-#define NRF_LOG_DEFERRED 1

    Try setting this to zero. Will loose more messages that way, but does not rely on the main() loop running correctly.

  • it is indeed disabled. 

    #define NRF_LOG_BACKEND_UART_ENABLED 0. 

    And yet no Logs are printed to the J link RTT viewer. 

    Try setting this to zero. Will loose more messages that way, but does not rely on the main() loop running correctly.

    Tried this and I started getting the corresponding NRF_LOG_INFO. 

     Having this cleared WORKED  #define NRF_LOG_DEFERRED 0. 

    Thank you very much for your Help. 

Reply Children
No Data
Related