Faster FreeRTOS Percepio Tracealyzer Streaming with Segger RTT

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:

RTT Streamnig affects target performance

RTT streaming affects target performance?

Continue reading

New FreeRTOS V10.0.0: Amazon, Segger SystemView and Percepio Tracealyzer

“Amazon FreeRTOS – IoT operating system for microcontrollers”: The announcement of FreeRTOS V10.0.0 was one of the biggest news last week for me. Not only is there now a Version 10, the bigger news is that FreeRTOS is now part of Amazon. Wow! Now this explains why Richard Barry (the founder behind FreeRTOS) was kind of hiding away for about a year: he joined Amazon as a principal engineer about a year ago. I think we all have to wait and see what it means for FreeRTOS.

Amazon FreeRTOS

Amazon FreeRTOS (Source: Amazon Web Site)

Continue reading

Better FreeRTOS Debugging in Eclipse

With debugging FreeRTOS applications in Eclipse, it is a big to have views available showing all the threads, queues, timers and heap memory allocation. One of the best Eclipse plugins are the one NXP provides for FreeRTOS: they are free of charge and give me pretty much everything I need. However, if you are not that familiar with FreeRTOS itself, here are a few tips to get more out of the plugins.

Better FreeRTOS Debugging in Eclipse

Better FreeRTOS Debugging in Eclipse

Continue reading

McuOnEclipse Components: 12-Mar-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following main features and changes:

  • Wait: Busy-Waiting using ARM DWT cycle counter
  • Percepio FreeRTOS+Trace: Updated to version 3.1.1, simplified usage of streaming and snapshot mode
  • GenericSWI2C: MCUXpresso SDK can be used with the bit-banging I2C driver support
  • FreeRTOS: includes updates of the 9.0.1 release, ‘optimized task selection, enabled MPU support (experimental)
  • Graphical GUI drivers for screens, windows, icons, headers, text widgets and more
  • SSD1351: display driver for Solomon Systech SSD1351 display
  • More components are now supported by the McuLibConfig settings
  • Many other smaller bug fixes and enhancements

Continue reading

What is “Realtime Debugging”?

Questions from students or readers of my articles are a great source for all kind of articles. And here is the ‘question of this week’: “What is realtime debugging”?

It’s a good question because the topic of ‘realtime’ and ‘debugging’ was a topic in the lectures this week. So this question gives me the opportunity to combine the two things of ‘realtime’ and ‘debugging’, I love it :-).

Debugging Setup

Debugging Setup

Continue reading

Percepio FreeRTOS Tracealyzer Plugin for Eclipse

Good news for everyone using Eclipse, FreeRTOS and Percepio Tracealyzer: Percepio has released an Eclipse plugin which makes snapshot tracing very easy and convenient using the a GNU gdb debugger in Eclipse like Kinetis Design Studio:

Eclipse with Percepio Tracealizer

Eclipse with Percepio Tracealyzer

Continue reading

McuOnEclipse Components: 28-Jan-2017 Release

I’m pleased to announce that a new release of the McuOnEclipse components is available in SourceForge, with the following main features and changes:

  • New Sharp Memory Display Driver supporting 96×96 and 128×128 pixel ultra low power display
  • PID_Int can be used without hardware
  • GenericTimeData has added functions to convert date/time into strings
  • HardFault can now disable write buffers on ARM Cortex to simplify debugging faults
  • Folder support for SEGGER SystemView and Percepio FreeRTOS+Trace
  • Component usage without Processor Expert
  • NXP MCUXpresso SDK support for FreeRTOS using tickless idle mode and low power timer
  • Many other smaller bug fixes and enhancements
SourceForge

SourceForge

Continue reading

First Steps with Ozone and the Segger J-Link Trace Pro

From time to time I face some problems which are really hard to find. Mostly these kind of bugs are very timing sensitive and depend on interrupt execution order. Maybe a dangling pointer is overwriting memory, code is running wild, or some functions are not reentrant as they should be. For these kind of bugs, good tools are worth their weight in gold. The Percepio FreeRTOS+Trace and the Segger SystemView have helped me many times to narrow down such kind problems in my applications. Another ultimate tools is hardware trace: Now I have a Segger J-Trace Pro for ARM Cortex-M in my arsenal of bug extinguishing weapons on my desk:
Dear bugs, look what I have on my desk. Your hiding time is over! 🙂

tracing-cortex-m4-with-j-trace

tracing-cortex-m4-with-j-trace

Continue reading

FreeRTOS Continuous Trace Streaming

Key to successfully implementing embedded applications these days is to have detailed visibility into what is going on with the application on the board. For this, I’m using the FreeRTOS+Trace from Percepio to inspect the runtime behaviour. Stop-Mode debugging is very useful, but visibility into the runtime is even more important. FreeRTOS+Trace is a tool to accomplish this, but it requires to dump the data off the target to the host (see “Updated Percepio Tracealyzer and Trace Library to Version V2.7.0“). Usually, I’m using the GDB debugger for this, and that works for shorter trace sequences like a few seconds. Yes, I can combine them, but it painful to stop, dump and continue. So what if I could collect trace for several minutes or hours without the need to stop the application? Why not stream the data to the host directly?

So here is it: I’m now able to get almost unlimited trace streaming off the target, witout user intervention. I can trace my application for hours 🙂

Trace Recording

Trace Recording for almost one hour

Continue reading

Updated Percepio Tracealyzer and Trace Library to Version V2.7.0

Percepio has recently released the v2.7 version of Tracealyzer. This is a major upgrade from the v2.6 version which I have used so far: time to upgrade my Trace component for FreeRTOS to the latest and greatest v2.7!

FreeRTOS Plus Trace View

FreeRTOS+Trace View (V2.7)

Continue reading