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

Cant get J-Link RTT Viewer to show log information

Hello again Nordic Pros,

I am trying to get some debug logging going using the 52DK running ble uart central under SDK 12.3 and RTT Viewer v6.4.

I have setup config.h as such:

and added this line to test getting a log with each RX event:

...
        case BLE_NUS_C_EVT_NUS_RX_EVT:
            NRF_LOG_DEBUG ("TEST!\r\n");
...

Yet there are no logs in any RTT Viewer Window when characters are sent via BLE.

What am I missing here?

Robin @ TL

I now have RTT-Viewer showing logs.  However, there are 2 problems:

1.) If I turn on timestamping, my board hangs,

2.) When logging is enabled, I cannot command the board via the terminal.

Any suggestions on how to remedy this issues is greatly appreciated!

Thanks 

Robin @ TL

  • Yes I have tried to log via RTT with the uart central on the 52DK  under SDK 12.3.  Could not get log messages in that configuration either.

  • Yes, our board is based on the nrF51822.  12.3 is the latest SDK for that SOC.  And, there are problems using the latest SDK for the 52 and interfacing with our 51 product.  See my ticket on dropped characters.

    At SDK 12.3 behaves well at both ends (peripheral and central), but I need a way of debugging while connected to a iphone.  RTT was the hopes but so far nothing seems to work.  A variety of problems, from RTT connect, but no log, to no connection to anything, depending on log setup on config.h.  Unstable to say the least.

    Robin @ TL

  • OK, for those who want to know... 

    I have RTT Viewer up and running, even on our 51 based custom board.  I am able to log messages while maintaining a UART->BLE->TARGET command/response link up.  Here is the test system comm path:

            51_based_custom_ble_uart_peripheral<->ble<->52DK_ble_uart_central<->USB_UART<->PC<->termite_terminal:                                                                                                                                                                                      |->RTT_Viewer.

    Both boards are running under SDK 12.3.

    Here is what I had to do:

    1.) Configure NRF_Logging in config.h:

    2.) Add the following preprocessor definition:

        NRF_LOG_USES_RTT=1

    3.) Add the following includes:

        #include "nrf_log.h"
        #include "nrf_log_ctrl.h"

    4.) Add the following define:

        #define NRF_LOG_MODULE_NAME "iDrink"

    5.) And, finally add the following log initialization macro:

         NRF_LOG_INIT(NULL);

    This is an amazing powerful tool for real time debugging in code tracing.  I hope this helps someone else in need of such capabilities.

    Thanks all for your help,

    Robin @ TL

Related