Agile Embedded Resources

We're Experts in Agile Embedded Software Development

We took a dare that Agile practices (particularly TDD and Continuous Integration) were impossible to implement in anything but desktop or web environments and languages like Java or C++. We ended up doing pioneering work to bring the value of Agile methods to embedded software development.

Traditional waterfall-like approaches have failed and fail more spectacularly as embedded systems become ever more complex. Go Agile with our resources below.

"Agile Project Management. Or, Burning Your Gantt Charts"

Given at the Embedded Systems Conference, Boston, October 2008.

Traditional embedded project management usually hinges on eliminating change and designing out uncertainty up-front; such an approach is fantasy. Agile Project Management offers solutions to common, persistent problems: poor estimates, slipped timelines, products languishing in an almost-done state, and Gantt charts rarely reflecting reality. Here we discuss: usable definitions of “customer", “feature" and “done"; prioritization; iterations; estimation; burndown charts; documentation; and risk & scope management.

Embedded Test-Driven Development Tools

These tools were originally developed internally for client embedded projects. We've evolved them over time and have now made them open source. While geared towards embedded development, these tools are useful for Test-Driven Development in any C project.

The practices and techniques that inspired the development of these tools are addressed in the papers and resources that follow.

"Mocking the Embedded World: TDD, Continuous Integration, and Design Patterns"

Despite a prevalent industry perception to the contrary, the agile practices of Test-Driven Development and Continuous Integration can be successfully applied to embedded software. We present here a set of practices, platform independent tools, and a new design pattern (Model Conductor Hardware – MCH) that together produce: good design from tests programmed first, logic decoupled from hardware, and systems testable under automation. Ultimately, this approach yields an order of magnitude or more reduction in software flaws, predictable progress, and measurable velocity for data-driven project management. We use the approach discussed herein for real-world production systems and have included a full C-based sample project (using an Atmel AT91SAM7X ARM7) to illustrate it. Download the paper (PDF).

Resources

Mocking the Embedded World: Example Project (ZIP) – full sample project distributed at Embedded Systems Conference Silicon Valley 2007

Setup & use instructions (for Windows):

1. Unzip the archive. Source files are in the \src directory; all system and unit tests are found in the \test directory.

2. Install the Ruby scripting language interpreter by downloading and running the One Click Installer. Version 1.8.5 was used with this example.

3. After installing Ruby, run "gem install rake" at a command line to install the Rake tool (Rake is Ruby make).

4. Install IAR's Embedded Workbench for ARM (Kickstart Edition). Version 4.41A (4.41.1.501) was used for this example.

5. From the root of the project run "rake -T" at the command line to list all rake tasks; run 'rake test:units' to build and run all of the project unit tests.

NOTES
  • The tools we created for unit testing & mocking and building the project are significantly improved today over the tools included in this sample project. Please see links above to download the publicly available, free tools.
  • The system tests are viewable in test\system of the sample project. However, without a miniLAB device and an Atmel AT91SAM7X ARM7 demo board, these tests cannot actually be executed. Note, however, that the unit tests are fully executable without hardware.

"Feature-Driven Design Using TDD and Mocks"

Given at the Embedded Systems Conference, Boston, October 2008.

Top-down design has long been talked about as a very efficient way of developing an embedded system. Although, many attempts at actually implementing a real product in this fashion has led to disaster since code interacting from a high-level down to a low-level interface to hardware registers begs to know how to interface to these hardware layers, thus sending the developer on a downward spiral toward implementing a bottom-up design, unfortunately breaking the original intent. We present a design methodology, Feature-Driven Design, that focus on the implementation of features instead of modules of code that gives way to architectures that evolve naturally and are much easier to understand and maintain. This way of development is fueled by unit test frameworks and automatically generated mocks, so that that designs can materialize from high level ideas and iterative refinement.

"Effective TDD for Embedded Software"

Today, quality in embedded software is generally tied to platform-specific testing tools geared towards debugging. We present here an integrated collection of concrete concepts and practices that are decoupled from platform-specific tools. In fact, this approach drives the actual design of embedded software. These strategies yield good design, systems that are testable under automation, and a significant reduction in software flaws. Examples from an 8 bit system with 16k of program memory and 255 bytes of RAM illustrate these ideas.