EngineeringComputer EngineeringComputer ScienceEmbedded SystemsFault-tolerant ComputingFormal MethodsExecutable System ModelsFinite State Machine ModelingHardware Modeling For Digital SystemsModel CheckingModel-driven Software EngineeringVerificationModel Verification
Abstract. A method for model checking of microcontroller code is presented. The main objective is to check embedded C code including typical hardware specific ingredients like embedded assembly statements, direct memory accesses, direct register accesses, interrupts, and timers, without any further manual preprocessing. For this purpose, the state space is generated directly from the assembly code that is generated from C code for the specific microcontroller, in our case the ATMEL ATmega family. The properties to be checked can refer to the global C variables as well as to the microcontroller registers and the SRAM. By this approach we are able to find bugs which cannot be found if one looks at the C code or the assembly code alone. The paper explains the basic functionality of our tools using two illustrative examples. 1 Introduction In recent years industries have recognized model checking as a promising tool for the development of embedded systems. Many embedded systems are used in safety critical environments. Full testing of the systems is often not possible because it is too time consuming or too expensive. However errors in these systems may lead to fatal events. A replacement of the software while in operation is often too difficult or not possible as it is in desktop systems. Hence the industries would like to verify their systems.