Automatic Bug Detection in Microcontroller Software by Static Program Analysis

  • Authors:
  • Ansgar Fehnker;Ralf Huuck;Bastian Schlich;Michael Tapp

  • Affiliations:
  • National ICT Australia Ltd. (NICTA), University of New South Wales, Sydney, Australia NSW 1466;National ICT Australia Ltd. (NICTA), University of New South Wales, Sydney, Australia NSW 1466;Embedded Software Laboratory, RWTH Aachen University, Aachen, Germany 52074;National ICT Australia Ltd. (NICTA), University of New South Wales, Sydney, Australia NSW 1466

  • Venue:
  • SOFSEM '09 Proceedings of the 35th Conference on Current Trends in Theory and Practice of Computer Science
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Microcontroller software typically consists of a few hundred lines of code only, but it is rather different from standard application code. The software is highly hardware and platform specific, and bugs are often a consequence of neglecting subtle specifications of the microcontroller architecture. Currently, there are hardly any tools for analyzing such software automatically. In this paper, we outline specifics of microcontroller software that explain why those programs are different to standard C/C++ code. We develop a static program analysis for a specific microcontroller, in our case the ATmega16, to spot code deficiencies, and integrate it into our generic static analyzer Goanna. Finally, we illustrate the results by a case study of an automotive application. The case study highlights that --- even without formal proof --- the proposed static techniques can be valuable in pinpointing software bugs that are otherwise hard to find.