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

RTT log doesn't show in Debug Terminal of emStudio v4.3

Hi,

I am using nRF SDK v16 with nRF52DK (pca10040) development board.

I've chosen to use RTT logging and I can see my app logs in JLinkRTTViewer window --- however, I can't see those logs in "Debug Terminal" of SEGGER emStudio v4.3. I can debug and progrand program the device within emStudio. I am using Ubuntu 18.04 desktop.

Does any one have similar issues and knows how to show RTT logs in the Debug Terminal?

Regards,

yf13

Parents
  • Hi yf13,

    I am sorry for the misunderstanding, there was a typo in the case I sent.

    The correct line is:

    NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED

  • actually I had a typo above as well, the sdk_config.h reads like:

    $ fgrep FLAG_AUTO sdk_config.h 
    // <q> NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED  - For each printed LF, function will add CR.
    #ifndef NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED
    #define NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0
    $

    But the Debug Terminal still shows nothing even though RTT Viewer works.

    Regards,

    yf13

  • hi yf13,

    what example have you based your application on?

    Could you check this in the sdk_config.h?

    NRF_LOG_BACKEND_RTT_ENABLED 1
    
    NRF_LOG_ENABLED 1

  • my app is based on ble_peripharal/ble_app_template but I changed it to use s112 since I don't need s132. To confirm gain, log related config lines here:

    $ cat sdk_config.h | fgrep NRF_LOG_ | fgrep -e LOG_ENABLED -e RTT_ENABLED
    // <e> NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
    #ifndef NRF_LOG_BACKEND_RTT_ENABLED
    #define NRF_LOG_BACKEND_RTT_ENABLED 1
    // <e> NRF_LOG_ENABLED - nrf_log - Logger
    #ifndef NRF_LOG_ENABLED
    #define NRF_LOG_ENABLED 1
    
    

    So it seems that they are both ENABLED, otherwise I won't be able to see logs in JLinkRTTViewer.

    BTW, I can always see logs with JLinkRTTViewer --- initially there are extra empty lines in the viewer which I solved by set NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to 0. However, I've never seen logs from the DebugTerminal in the studio.

    Regards,

    yf13

Reply
  • my app is based on ble_peripharal/ble_app_template but I changed it to use s112 since I don't need s132. To confirm gain, log related config lines here:

    $ cat sdk_config.h | fgrep NRF_LOG_ | fgrep -e LOG_ENABLED -e RTT_ENABLED
    // <e> NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
    #ifndef NRF_LOG_BACKEND_RTT_ENABLED
    #define NRF_LOG_BACKEND_RTT_ENABLED 1
    // <e> NRF_LOG_ENABLED - nrf_log - Logger
    #ifndef NRF_LOG_ENABLED
    #define NRF_LOG_ENABLED 1
    
    

    So it seems that they are both ENABLED, otherwise I won't be able to see logs in JLinkRTTViewer.

    BTW, I can always see logs with JLinkRTTViewer --- initially there are extra empty lines in the viewer which I solved by set NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to 0. However, I've never seen logs from the DebugTerminal in the studio.

    Regards,

    yf13

Children
Related