Debugging Real-Time Software (English)

Course Description

This course examines the activities involved in discovering and correcting errors, flaws, faults and failures in real-time and embedded systems software.

The class begins with a presentation of the main steps and guidelines for identifying and remedying situations in which real-time and embedded software is not working correctly. This is followed by a survey of the wide range of categories of bugs from which such software can suffer. The class then quickly focuses in on a detailed discussion of the "top 5" kinds of bugs that can be "project killers" or "product killers", including stack overflows, race conditions, deadlocks, timing problems, and re-entrancy conditions . Emphasis is placed on multitasking and timing behaviors,

rather than on general data processing issues.

The class continues with an examination of debugging tools that are helpful in real-time software development, such as low-level monitors, and high-level RTOS-aware system debuggers.

Liveness' issues including deadly embrace, lockout, memory starvation and CPU starvation are discussed in depth. As are the special sorts of bugs that tend to create problems in Interrupt Service Routines ("ISRs"). Attendees learn how to evaluate configuration and capacity needs, as well as to examine design dangers such as interrupt overflow. The class continues with techniques for quantitative evaluation of timing performance bugs in real-time software.

This course is not a general course about software debugging, but rather it is highly focused on the debugging of embedded, time-constrained, resource-constrained multitasking software that may run under the control of a modern real-time operating system ("RTOS").

Course Content

  • Introduction
    • What is a Bug ?
    • The Debugging "Cookbook"
    • 9 Golden Guidelines for Debugging
    • A Taxonomy of Real-Time / Embedded Bugs
    • Exercise: Bugs when Porting to New Hardware
  • The "Top 5" Typical Real-Time Bugs
    • Stack Overflows
    • Race Conditions
    • Deadlocks
    • Timing Problems
    • Re-entrancy Conditions
  • Real-Time Debugging Tools
    • Where Traditional Debugging Techniques are Insufficient
    • The 3 Classes of Real-Time Software Debuggers
    • Logic Analyzers
    • Exercise: Bug in a Real-Time Controller
  • Bugs in Multi-tasking: The Mis-use of RTOS's
    • The Correctness Killers: Violations of Liveness
    • Ingredients for Deadlock and their Avoidance
    • Task Lockouts and Starvations
    • Task Decomposition and Communication Defects
    • Interrupt Service Routine Design Defects
    • RTOS Usage Defects
    • Exercise: Bug in Interrupt Handling
  • Real-Time Performance Bugs
    • Task Scheduling Timing Failures
    • Analysis of Individual Timing Scenarios
    • Periodic Tasks and Deadlines
    • Sporadic Tasks and Interrupt Handling Timing
    • Resource Sharing Delays
    • Exercise: Performance Calculations
  • C-Language Programming Bugs in Real-Time Software
    • C-Language Ambiguities
    • Coding Discipline for C-Language
    • C-Language Code Analysis and Tools
    • Static vs. Dynamic Code Analysis
    • Exercise: C-Language Shenanigans
  • Optional Sections
    • Overview of Embedded Software Testing and Verification
    • Bugs in Multi-Core and Symmetric Multi-Processing Software

Prerequisites

Course participants are expected to have practical knowledge of coding for real-time and embedded systems, plus some familiarity with at least one RTOS.

Additional knowledge useful for attendees of this course can be obtained at the co-requisite advanced course

"Architectural Design of Real-Time Software".

Target Group

This course is intended for practicing real-time and embedded systems software designers, software developers, project managers and quality engineers who have responsibility for planning, implementing and debugging the software for real-time and embedded computer systems.

Course Material

  • course notes

FlexyTrain: Our flexibility – Your plus

No date fits you? No problem, we offer you maximum flexibility and together we will find an adequate date. Just Contact us!