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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Clarke, E., Kröning, D., Lerda, F.: A Tool for Checking ANSI-C Programs. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 168–176. Springer, Heidelberg (2004)
Clarke, E., Kröning, D., Sharygina, N., Yorav, K.: SATABS: SAT-based predicate abstraction for ANSI-C. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 570–574. Springer, Heidelberg (2005)
Henzinger, T., Jhala, R., Majumdar, R., Sutre, G.: Software verification with BLAST. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 235–239. Springer, Heidelberg (2003)
Coverity: Prevent for C and C++, http://www.coverity.com
Gimpel Software: Flexelint for C/C++, http://www.gimpel.com/html/flex.htm
Klocwork: K7, http://www.klocwork.com/products/klocworkk7.asp
Microsoft: Prefast, http://www.microsoft.com/whdc/devtools/tools/PREfast.mspx
Emanuelsson, P., Nilsson, U.: A comparative study of industrial static analysis tools. In: SSV 2008. ENTCS, vol. 127 (2008)
Schlich, B., Kowalewski, S.: Model checking C source code for embedded systems. In: Proc. of the IEEE/NASA Workshop on Leveraging Applications of Formal Methods, Verification, and Validation, NASA/CP-2005-212788 (September 2005)
Fehnker, A., Huuck, R., Jayet, P., Lussenburg, M., Rauch, F.: Model checking software at compile time. In: TASE 2007. IEEE Computer Society Press, Los Alamitos (2007)
Schlich, B.: Model Checking of Software for Microcontrollers. Dissertation thesis, RWTH Aachen University (2008)
Dams, D., Namjoshi, K.: Orion: High-precision methods for static error analysis of C and C++ programs. Bell Labs Tech. Mem. ITD-04-45263Z, Lucent Technologies (2004)
Holzmann, G.J.: Static source code checking for user-defined properties. In: IDPT 2002, Pasadena, CA, USA (June 2002)
Schmidt, D.A., Steffen, B.: Program analysis as model checking of abstract interpretations. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 351–380. Springer, Heidelberg (1998)
Cimatti, A., Clarke, E., Giunchiglia, E., Giunchiglia, F., Pistore, M., Roveri, M., Sebastiani, R., Tacchella, A.: NuSMV Version 2. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, p. 359. Springer, Heidelberg (2002)
Salewski, F., Wilking, D., Kowalewski, S.: Diverse hardware platforms in embedded systems lab courses: a way to teach the differences. ACM SIGBED Review 2(4) (2005)
Schlich, B., Salewski, F., Kowalewski, S.: Applying model checking to an automotive microcontroller application. In: SIES 2007. IEEE, Los Alamitos (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fehnker, A., Huuck, R., Schlich, B., Tapp, M. (2009). Automatic Bug Detection in Microcontroller Software by Static Program Analysis. In: Nielsen, M., Kučera, A., Miltersen, P.B., Palamidessi, C., Tůma, P., Valencia, F. (eds) SOFSEM 2009: Theory and Practice of Computer Science. SOFSEM 2009. Lecture Notes in Computer Science, vol 5404. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-95891-8_26
Download citation
DOI: https://doi.org/10.1007/978-3-540-95891-8_26
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-95890-1
Online ISBN: 978-3-540-95891-8
eBook Packages: Computer ScienceComputer Science (R0)