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

Segger RTT - How to increase maximun line count?

I want to use Seggers RTT for data logging.. but after 199lines the Viewer starts to overwrite the old lines.. so that only the most recent 199 lines are displayed..

Are there by the way any other tools I can use instead of the standard one?

  • All right, I found a possibility:

    • download the Segger Software and Documentation pack
    • extract and install it (do not replace existing DLLs as it may conflict with an existing tool chain)
    • in the install folder (e.g. "C:\Program Files (x86)\SEGGER\JLink_V502f") find the JLinkRTTLogger.exe application and start it
    • enter the device name which is the Segger serial number of the device (maybe also any other name works?)
    • follow the instructions and enter the required parameters
    • select the device from the popup but do not update the device firmware (if asked)
    • in device selection prompt (if shown) press "Yes" and select your target device (in my case nRF51822_xxAA)

    Now the logger started to log...

  • @ muhkuhns: I cannot see any other answer or comment in this thread giving a solution. The solution I described works but the performance is even worse than with UART printf. I have up to four values to be logged every 1ms. With UART printf I miss approx. 55% and with RTT approx. 70%. Do you have experienced any performance issues like this?

  • Thanks for the answer. The hint to start the RTT viewer and then use any Telnet client works fine to logg the data (I use putty: Host Name = localhost, Port = 19021). However RTT does not be as fast as claimed on the SEGGER webpage. With UART printf I still get the better performance! Actually I have no idea why RTT performs bad...

  • Glad and sad to hear as well. I used SEGGER_RTT_printf(0, "\r\n%d;%d;%d;%d;%d;%d;%d;%d",d...) to output my measurements every 250ms. This worked fine and the SoC could perform as usual. Sadly I can't anymore on this topic. Good Luck!

  • Thanks for your fast answers! I use SEGGER_RTT_printf(0, "%c\t%u\r\n", <uint8_t>, <uint32_t>); directly in the ISR which will be triggered 4x every 1ms. Sure, this is quite often but only few data are printed hence RTT should do the job within a few microseconds [us]. Seems that the printf overhead is quite large...

    To solve this issue I will implement a large FIFO storing the received data during the test and after the test is stopped printing the whole FIFO content which is not time critical anymore.

Related