[PDF][PDF] On the role of program comprehension in embedded systems

J Feigenspan, N Siegmund, J Fruth - Softwaretechnik-Trends Band 31, Heft …, 2011 - dl.gi.de
J Feigenspan, N Siegmund, J Fruth
Softwaretechnik-Trends Band 31, Heft 2, 2011dl.gi.de
Today, we are surrounded by computers. However, only a minor part is working stations we
might think of. The major part, about 98%, are embedded systems [15], for example PDAs,
mobile phones, sensors, or credit cards. For embedded systems, resource constraints
regarding memory capacity and performance are characteristic. Furthermore, the hardware
is heterogeneous, which leads to challenges regarding how to tailor software to actual
hardware of application scenarios [10]. In practice, embedded systems are typically …
Today, we are surrounded by computers. However, only a minor part is working stations we might think of. The major part, about 98%, are embedded systems [15], for example PDAs, mobile phones, sensors, or credit cards. For embedded systems, resource constraints regarding memory capacity and performance are characteristic. Furthermore, the hardware is heterogeneous, which leads to challenges regarding how to tailor software to actual hardware of application scenarios [10].
In practice, embedded systems are typically implemented in C using conditional compilation with the C preprocessor. Conditional compilation allows users to customize software to new hardware without having to implement or adapt source code. To illustrate this, we show a source-code excerpt of BerkeleyDB1, an embedded data base, in Figure 1. We can configure BerkeleyDB to run on several systems without having to change or introduce new source code. For example, in Line 5, we see an ifdef directive# ifndef, followed by a variable HAVE QUEUE. This means that if HAVE QUEUE is not defined, the following 3 lines are included by the preprocessor. If HAVE QUEUE is defined, then the lines are deleted and, as defined by the ifdef directive# else in Line 9, the following lines (10–16) are included instead. Hence, by simply specifying variables, we can adapt BerkeleyDB to run on different hardware, different operating systems (eg, Windows or Linux) or for different application scenarios (eg, with or without transaction support), without changing the source code.
dl.gi.de
Showing the best result for this search. See all results