Course Overview

Course Length: 
2 Days

Finding and killing latent bugs in embedded software is a difficult business. Heroic efforts and expensive tools are often required to trace backward from an observed crash, hang, or other unplanned run-time behavior to the root cause. In the worst-case scenario, the root cause damages the code or data in a subtle way such that the system still appears to work fine or mostly fine-–at least for a while.

This course teaches engineers how to use inexpensive tools, such as logic analyzers, to locate the Top 10 Causes of Nasty Firmware-Specific Defects. These are the sorts of common anomalies that cannot be easily reproduced in the lab and are thus too-often dismissed as “user errors” or “glitches” only to rear their nasty heads after the product ships to customers. Prevent these ghosts in the machine from living in your system by learning how to debug well despite the limitations of cross-platform debuggers and software tools.

Through a set of hands-on exercises with an ARM Cortex processor board, a USB logic analyzer, an IDE debugger, participants learn for themselves how to find and kill common real world embedded-specific firmware bugs. Each attendee also goes home with a Saleae Logic-8 USB logic analyzer and ARM board.

Topics covered during this course include:

  • Looking Under the Hood
  • Top 10 Causes of Nasty Firmware Bugs
  • Debugging in the Presence of an RTOS
  • Debugging at the Hardware Boundary
  • Tales from the Trenches

This course is appropriate for:

  • Embedded software developers

Prerequisites:  Attendees should have a working familiarity with the C programming language.

Explore this course:

Find out more:


The following is a summary of the major course topics and should not be considered the section-by-subsection lecture breakdown.

Looking Under the Hood

  • Calling Conventions & Register Usage
  • C Code vs. Generated Assembly Code
  • Linker Command Files and Linker Map Files
  • Atomicity, Alignment, Word Size, etc.

Top 10 Causes of Nasty Firmware Bugs

  • Race Condition
  • Non-Reentrant Function
  • Missing 'volatile' Keyword
  • Stack Overflow
  • Heap Fragmentation
  • Memory Leak
  • Deadlock
  • Priority Inversion
  • Incorrect Priority Assignment
  • Timing Jitter

Debugging in the Presence of an RTOS

  • Pre-emption Hazards
  • RTOS-aware Debuggers
  • Tracing & Logging
  • Debugging at the Hardware Interface

Debugging at the Hardware Boundary

  • Reset Issues
  • Timing Violations
  • Low Power Modes
  • Multi-Processor Systems

Tales from the Trenches

Related Courses

Find out More

Contact us now to find out more about this course or to enquire about an on-site training at your company.

Recording Policy

Barr Group's courses may not be audiotaped, videotaped, or photographed without consent from Barr Group's executive team.