To solve the real hard problem of Embedded Systems development, I usually need all the data I can get from the target. The Percepio Tracealizer is such a tool which can stream application and FreeRTOS trace from the target over a Segger J-Link connection using the Segger RTT protocol. I’m using that combination a lot.
Streaming trace data that way does not need a dedicated hardware like ETM Trace. Using RTT is usually not much intrusive and affects the performance of the target in the 1-2% range (of course depending on the amount of data).
But what worried me for several weeks is that after moving to FreeRTOS V10.0.0 and the same time updating the Segger libraries, the target performance was heavily affected:
My thought was that it must have something to do with the new FreeRTOS V10.0.0, but I was never able to isolate the problem. It seemed even kind of random, as on some targets the effect was not that noticeable.
I’m using the following versions:
- FreeRTOS V10.0.0
- Percepio Tracealyzer V188.8.131.5220
- Segger RTT V6.22c
- Segger J-Link JLinkARM.dll V6.30c (DLL compiled Feb 9 2018 17:20:54)
I contacted Percepio, and they were puzzled with that problem too. Finally, Percepio has find something:
Because most of my ARM targets implements SWD, I’m using that method to connect to the target in the debug launch configurations:
In the Percepio Tracealyzer setting there is a similar setting, which usually is set to default:
The thing is that changing it from ‘Default’ to ‘SWD’ solves the performance problem:
Now the target performance is what it should be, and back to were it was 🙂 :
So if you see slow RTT performance, make sure that both sides are using SWD.
So at the end it was not the FreeRTOS, but possible a change in the Segger DLL’s causing that performance problem, because in the past using ‘Default’ was fine. And I did not realize that having updated the Segger DLL’s could have caused such an effect. Probably something goes wrong with that automatic protocol detection.
Thanks to Johan Kraft from Percepio for the hint!
Happy Streaming 🙂