Creating a safer, greener, more secure future.

Visualizing SAFERTOS® Runtime Behavior: From Complexity to Confidence

Safety‑critical embedded systems demand predictability. Whether the application controls industrial equipment, transportation systems or medical devices, engineers need confidence that tasks execute when expected, deadlines are met, and faults can be understood and corrected. This is precisely why Real-Time Operating Systems (RTOS) such as SAFERTOS® are used in these environments.

However, while an RTOS enables robustness through multi-tasking and fixed‑priority scheduling, it also introduces a layer of complexity that is difficult to reason about purely from source code or static analysis. Tasks pre‑empt each other, interrupts occur asynchronously, and subtle changes in CPU load can result in unexpected system behavior.

In our new joint white paper with Percepio, Visualizing SAFERTOS® Applications, we explore how Tracealyzer brings clarity to this complexity by transforming runtime behavior into clear, interactive visual representations.

Understanding Runtime Behavior in Safety‑Critical RTOS Systems

SAFERTOS® applications typically involve multiple concurrent tasks performing time‑critical functions such as control loops, communication handling, diagnostics and human‑machine interfaces. These tasks are scheduled using fixed‑priority scheduling, a model that is both efficient and predictable, provided priorities are chosen correctly.

In practice, diagnosing timing issues in such systems is challenging:

  • A task may execute within its expected runtime yet suffer excessive response times
  • Sporadic overload conditions may only manifest under specific operational sequences
  • Blocking on kernel objects such as queues or mutexes can delay high‑priority execution in subtle ways

Traditional debugging techniques, breakpoints, logging, or GPIO timing, often disrupt system behavior or fail to explain why a problem occurs. What’s missing is a way to observe the system holistically, exactly as it runs.

Runtime Visualization with Tracealyzer

Tracealyzer addresses this challenge by providing RTOS‑aware runtime visualization. For SAFERTOS® applications, it captures and presents:

  • Task scheduling and pre‑emption
  • Interrupt handlers alongside task execution
  • RTOS API calls on queues, semaphores and mutexes
  • User‑defined events relevant to application behavior

At the center of Tracealyzer is a vertical timeline that correlates task execution with system events. Rather than analyzing isolated logs or averages, engineers can see exactly how tasks interact over time.

A key concept introduced by Tracealyzer is that of instances. Each execution of a task is treated as a distinct instance, allowing execution time and response time to be calculated per iteration rather than as an average. This makes infrequent but critical outliers visible, precisely the cases that can cause safety issues in the field.

Performance Analysis You Can Trust

For safety‑critical systems, predictability matters just as much as raw performance. Tracealyzer enables engineers to analyze performance from multiple angles:

  • Execution time shows how much processor time a task consumes
  • Response time reveals delays caused by pre‑emption or blocking
  • Historical plots expose trends and anomalies across long‑running traces

Crucially, these metrics remain connected to the underlying execution context. Clicking on an unusual data point in a performance plot immediately reveals the corresponding runtime sequence in the main timeline, allowing engineers to pinpoint cause and effect.

This interconnected approach avoids guesswork and speeds up root‑cause analysis.

A Practical Example: Debugging a Watchdog Reset

The white paper illustrates these ideas with a real‑world SAFERTOS® debugging scenario involving an intermittent watchdog reset.

At first glance, the system appeared to run normally. A high‑priority task was responsible for periodically clearing the watchdog timer, yet resets still occurred. Using Tracealyzer’s user events and visualization:

  • Engineers could see when the watchdog margin decreased
  • A blocking queue send operation became visible at the critical moment
  • Object history revealed a full queue that prevented timely execution
  • CPU load graphs highlighted priority‑related starvation

The resolution was not a code rewrite, but a scheduling decision: adjusting task priorities to reflect functional criticality. After the change, Tracealyzer confirmed stable behavior, consistent CPU usage and a watchdog margin that never expired.

This example demonstrates the true value of runtime visualization, not just detecting faults, but providing confidence that they have been resolved.

Built for Safety‑Critical Development

Tracealyzer complements SAFERTOS® particularly well because both are designed around predictability and analysis:

  • Fixed‑priority scheduling is fully visualized and measurable
  • Kernel object interactions are traceable and explainable
  • Application‑specific behavior can be instrumented using lightweight user events

For engineers working in regulated or safety‑focused environments, this level of visibility supports not only debugging, but also validation, verification and long‑term maintenance.

Understanding what happens at runtime is essential for building safe, reliable embedded systems. With Tracealyzer, SAFERTOS® developers gain a window into real system behavior, turning complex scheduling interactions into actionable insight.

The joint white paper with Percepio provides a practical, hands‑on guide to using visualization as a tool for confidence, not just convenience.

Download “Visualizing SAFERTOS® Applications” to explore the full example and technical detail.

Back to News