INSE lecture 18 – Embedded systems what they are hardware for embedded systems kernels for embedded systems building embedded systems testing embedded systems embedded systems in Java
What “ embedded ” means a computer (usually small) built into some non-computer equipment usually to monitor & control that other equipment ~98% of CPUs since 2004?
Physical aspects Small, to occupy minimal space Often need to be “ ruggedized ” against temperature (high, low, sudden change) vibration humidity, oil, chemical attack nuclear shock (military applications) Therefore often encapsulated in a resin-filled metal box
Central hardware aspects Low cost (to not significantly raise the unit price of the whole system) Minimal CPU/ROM/RAM – but that means something different every year Still often 8-bit or 16-bit; occasionally 32-bit, now rarely 4-bit low clock speeds – but faster every year ? Low-power components in battery-based systems
Peripheral aspects Often switches or primitive keypad (not a full typewriter keyboard) No screen or a primitive screen Input devices can include thermometers, pressure sensors, rev-counters, radar etc; Output devices are often relays or other electro-mechanical control systems In “ electronic ” systems (e.g. DVDs, mobile phones) I/O can be via specialist chips (e.g. audio)
Software aspects No need or memory-space for a full O/S but often a “ kernel ” of an O/S peripheral interfaces – e.g. interrupt drivers
Implies new SE challenges! tighter restrictions on design freedom extra issues to design for to fit small hardware whether speed is adequate …… programming methods testing methods
Kernel software many embedded systems need an O/S “ kernel ”
Kernel for common services interrupt drivers ? “ flash ” disk => a simple filing system ?elementary scheduler The kernel of a larger embedded system might go further – e.g. ?an elementary database
Commercial kernels Many are available depends on the CPU type
Building embedded software We are not using a general-purpose computer! – consequences Languages
Not a general-purpose computer So nowhere to hold source & binary files on it can ’ t edit on it can ’ t compile on it …… Therefore develop the source and binary on a general- purpose computer => specialist IDE? cross-compile it; various means for transferring it to the target.
Language needs need ability to write interrupt drivers? need to address specific memory addresses? bitwise operations?
Common languages assembler CC C++ Ada Java (later)
Testing embedded software hampered by hardware restrictions need some new testing tactics!
Instrumenting the hardware Collecting & observing electronics signals from the hardware probably doesn ’ t change the behaviour of the system, but … the information is of limited use.
Slaving the hardware a modified version of the system motherboard, attached to the development computer (rather than in the target environment) runs under control of the development computer development computer fakes inputs; development computer collects outputs. May affect the behaviour of the system under test
Extending the hardware Extend a test motherboard to support keyboard, screen etc. Very likely to significantly affect the system under test
Or just simulate! Want software on the development system that “ fakes ” the behaviour of the target hardware Good for large-volume preliminary tests Might be part of the IDE Many commercial simulators available – depends on the CPU
Embedded Java A special case Commonly used where there is a simple GUI
Background Java is usually compiled to “ bytecode ” … not to executable machine code The bytecode is interpreted by a “ Java Virtual Machine ” (JVM) program Only need a JVM for a CPU to run Java on it … don ’ t need any cross-compiler … can test on anything else with a JVM
Features of embedded Java Can use Java library AWT is especially useful for GUIs Bytecode is compact => need less ROM Very portable – e.g. can easily change CPU chip Bytecode is downloadable (if there is a communications peripheral) SLOW so may be one of a pair of languages in some embedded systems
After this lecture Keep your eye open for new kinds of embedded systems … and their new features/tradeoffs etc Be aware of the huge number of jobs in such an industry …
u © C Lester