Why use QTrace ?

See inside your code

QTrace is the lowest cost, fully featured, real-time trace tool available for ARM Cortex-M.

The real-time visualisations offered by QTrace showing how your application is running just aren’t possible using traditional debugging techniques. If you’re looking to boost your productivity without breaking the bank then QTrace is the tool for you.
Here are a just few examples of what’s possible with QTrace:
● Watch functions being executed in real-time and see conditional branches being taken
Uncover valuable information without stopping the CPU i.e. without break-points or code changes
● Identify which functions the CPU spends most of its time executing
● See if a function has ever been executed and, if so, how many times (≅1000’s of breakpoints)
● Examine which interrupts are occurring and how often
● Review 10’s of milliseconds of execution prior to a CPU fault exception
● Determine the percentage of functions executed and the paths within them
● Graph and export application data via the ITM port with absolutely minimal effort / overhead

According to the EETimes 2019 Embedded Markets Study, the no.1 item that developers would like to improve is debugging tools. This is no surprise considering that debugging an embedded application takes at least 20% of an overall software development budget. If the process of actually making code work on the target is included then the figure increases significantly. Clearly, any improvements to debugging tools will result in savings of both time and money.

Jacob Beningo of Beningo Embedded Group has an excellent article on the justification for purchasing decent development tools.

Time consuming bugs

Most projects have a number of bugs that consume hours or even days of investigation, especially those which cause CPU exceptions. These kinds of bugs can lead to late nights, especially as deadlines loom. Having as much insight as possible into what the code is doing is key to solving these problems and that’s exactly what trace provides. In the case of CPU exceptions, QTrace will highlight exactly where an exception occurred and then give 10’s of milliseconds of execution history prior to the fault to help pin point the problem.

Hard-to-find bugs are usually intermittent and here traditional debugging can be inadequate as it is unlikely that breakpoints are set in every location of interest. With code coverage, the QTrace source code view reveals exactly where the processor has been, and how many times. It’s like having 1000’s of continuously active breakpoints to provide a ‘smoking gun’ for many bugs.

Non intrusive

One of the key strengths of QTrace is being able to gather information about program execution without affecting it in any way. Being able to see how an application is running without stopping the processor is particularly useful for communication stacks. These are used in some form in most applications and are becoming even more prevalent with the growth of IOT. Traditional break-and-step debugging will usually cause timeouts at the other end of a connection and can make debugging tricky and time consuming.

Other examples of applications that can’t be stopped without causing problems include motion control, high speed data acquisition, PID controllers, etc. With QTrace, a graphical call stack can be generated from any executed source line without stopping the processor. This can be invaluable to understand how a particular function is being called but without interfering with the program flow.

Real-time visualisation

Being able to see in real-time which areas of code are being executed, and how often, is incredibly powerful. It can throw up surprises by revealing non-executed code which was expected to have been run. Similarly, being able to see instantly which interrupts are occurring and how often is another very helpful feature. To achieve this with traditional debugging requires instrumentation code to be added but that takes time to implement (and execute) and can introduce problems of its own.

💡 The leap in visibility that QTrace brings to your code is like the difference between printf debugging and using a JTAG based debugger.

For more details about QTrace goto the home page or browse the menus at the top of the page.