Debugging embedded applications is not as easy as it used to be, writes Niclas Lindblom, Senior Field Application Engineer at Percepio.
The increasing popularity of running embedded applications on sophisticated processors that demand a real-time operating system (RTOS) means that the level of abstraction has increased significantly, making debugging a much more complex task.
How do you debug a system where an RTOS decides what part of the software to run at any given time? Placing a breakpoint in a function will work fine, but what will be executed next time the system takes a step? The next line in the same function? An ISR? Part of the RTOS Kernel?
How do you decide which priorities to use and how do you detect if this decision is wrong? And how do you know if the system executes the way you intended?