This blog is the first in a series on the new debug features in SOMNIUM DRT.

We all know from experience (and this is confirmed by many studies) that debugging takes up a significant part of the time in software development. Software systems are complex and debugging is hard. This is especially true for embedded systems where there may be real-time constraints on when data is received or sent, the timing of interrupts, and so on. This means that traditional techniques, such as breakpoints or changing to code to print out state information, cannot be used because they will drastically change the timing and therefore the behavior of the program. Program flow is often controlled by asynchronous and external events, for example inputs from touch sensors and other peripherals. Therefore the real-time behavior of the program cannot be understood simply by looking at the control flow in the source code.

SOMNIUM DRT includes features to support debugging embedded systems. One of these enables the live, non-intrusive display of interesting data. Another is the ability to trace program flow so you can step backwards and forwards through the execution history to see how you to to a particular state.

SOMNIUM DRT is is a set of development tools for ARM Cortex-M based devices [such as the Kinetis and LPC devices from NXP and the STM32 devices from STMicroelectronics]. It is fully compatible with industry-standard tools such as the GNU toolchain and Eclipse IDE. DRT uses our patented techniques to produce highly optimized code by exploiting information about the embedded processor, the memory system and other peripherals to deliver improved performance, lower code size and reduced energy use.

It also includes some great debugging tools such as trace, live expressions and fault diagnosis.

Live Expression View

The first of these is the live view of expressions. This enables you to see the value of global variables, and expressions using them, change as the program runs. This is minimally intrusive - it cycle-steals from the bus to grab the data but does not affect the processor itself - so there is far less chance that it will change the behavior of the running program. There are no source code changes required, you just need to click the icon in the expressions view to enable live updates. The debugger will periodically read the selected memory locations and update the values in the expressions view without interrupting program execution.

A free trial of DRT is available. DRT is able to automatically import projects from other Eclipse-based development environments, making it simple to migrate your projects to DRT so you can quickly see the benefits for yourself. Download your free trial today and try out these powerful debug features for yourself.