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

Enabling RTT viewer in nRF52840 ble_app_blinky

Hello,

 

I am using nRF52840, SDK_16.0.0, S140 SoftDevice and Segger 4.16 for flashing the image. I am using ‘ble_app_blinky’.

 

1) Instead of UART, I am trying to enable RTT in ble_app_blinky so that I can see debug prints in RTT. For this I changed below settings.

                NRF_LOG_BACKEND_RTT_ENABLED 1

                NRF_LOG_ENABLED 1

 

                NRF_LOG_BACKEND_UART_ENABLED 0

 

                With below code

 

                NRF_LOG_INFO("\nBlinky example started_NRF_LOG_INFO");

                 printf("\nBlinky example started_printf");

 

                Still I am not able to see debug prints in RTT tool. Any settings to be changed.

a) Whether printf() will and NRF_LOG_INFO(), both are same ?

2) Below are my RTT settings in J-Link. Are they fine.

a) I got pop-up window. Any path to be specified as part of “Script file”.

               

 b) After clicking on OK, in tool I am seeing connection getting established. But still no prints on “Termonal 0”.

3) When I connected I am seeing partial debug prints. I am not sure why is this ?

4) Last try I checked with “RTT” within Segger IDE. There I am able to see debug prints in “RTT” window. But this is not my use case. I want to see debug prints in external RTT tool without any Segger IDE. Please correct me if I am wrong in my understanding.

Thanks & Regards

Vishnu Beema

Parents
  • Hi Susheel,

    Thank you for your inputs. My further queries are:

    1) What is the difference between NRF_LOG_INFO() and printf(). Whether both will redirect to RTT.

    NRF_LOG_INFO("\nBlinky example started_NRF_LOG_INFO");

             printf("\nBlinky example started_printf");

    2) Whether "Debug Terminal" in Segger IDE and RTT viewer are similar ?

    3) As mentioned in point '4' above, whether can I open both RTT in Segger and external RTT viewer.

    Thanks & Regards

    Vishnu Beema

Reply
  • Hi Susheel,

    Thank you for your inputs. My further queries are:

    1) What is the difference between NRF_LOG_INFO() and printf(). Whether both will redirect to RTT.

    NRF_LOG_INFO("\nBlinky example started_NRF_LOG_INFO");

             printf("\nBlinky example started_printf");

    2) Whether "Debug Terminal" in Segger IDE and RTT viewer are similar ?

    3) As mentioned in point '4' above, whether can I open both RTT in Segger and external RTT viewer.

    Thanks & Regards

    Vishnu Beema

Children
No Data
Related