BaS & ECE April 2015 - page 20

April 2015
20
T
OOLS
& S
OFTWARE
Developing and debugging deeply
embedded applications in UML
By Daniel Siegl, and Wilfried Nesensohn,
LieberLieber Software,
and Heiko Riessland,
PLS
It is often hard to prove functional
safety for deeply embedded systems
with complex multicore SoCs. In such
cases a model-based development
platform like Enterprise Architect,
used with a code generator optimi-
zed for embedded applications and a
model-based testing tool, makes this
problem relatively easy to solve.
„„
Model-based development is nding more
and more followers, and the eld of indus-
trial and automotive embedded systems is
no exception. is is hardly surprising, since
especially in these challenging areas of tech-
nology it is in fact more important than ever
to use mechanisms that help to ensure that
the product complies with all requirements
and safety criteria. A growing use of multicore
architectures increases this pressure even fur-
ther, since the complex interactions in the par-
allel execution of so ware also signi cantly
complicate the detection of functional safety.
Basically, working with models to develop
embedded applications has many advantages,
such as: continuity from requirements man-
agement to nal C/C++ code, object- and
component-oriented development without
having to switch to C++, and less e ort when
switching to C++ later on.
In the case of already-running embedded
projects, practical experience shows that the
best course of action is to begin to develop
parts of the functionality using the mod-
el-based approach. In this way, the fairly new
model-based approach can be brought - step
by step - into the company without having
to discard existing code while overwhelm-
ing developers. In general, it is important to
always keep in mind the speci c requirements
of the embedded environment. e consider-
ations include, for example: the limited per-
formance of the hardware; the code must
e ciently conserve resources; a so ware bug
detected too late is an o en costly a air (e.g.
expensive auto recalls); the code must sat-
isfy very speci c standards (MISRA); and it
should integrate well with existing code.
e use of a model-based development plat-
form such as Enterprise Architect from Sparx
Systems demonstrably improves not only the
development process of so ware and systems,
but also communication between the people
involved. e graphically-oriented represen-
tation in UML enables instant documentation
of the so ware architecture and development
process, and makes it easier for non-UML
professionals to understand.
UML/SysML are very broadly-applicable lan-
guages, but were not speci cally designed for
creating embedded systems. In order to adapt
the Enterprise Architect modeling platform
( gure 1) - now with over 330,000 licenses in
operation worldwide - to the speci c require-
ments of embedded engineering, LieberLieber
so ware therefore combines two key func-
tions in the LieberLieber Embedded Engineer
product package: code generation (uml2code)
and debugging UML (UML debugger). As
part of the entire tool chain, this solution,
which is aimed primarily at embedded so -
ware developers and so ware architects, but
which can also be useful for testers and inte-
gration managers, enables code generation
from UML structures, state machines and
activity models and generates platform-inde-
pendent C++ and MISRA-compliant C code
from UML models.
A characteristic valued by most customers
is the potential coexistence of handwritten
and generated code. However, it should be
ensured that generated code is only altered by
changes in the model or the generator. is
ensures that model and code are identical at
all times. Basically, the automatic code gener-
ation especially makes sense if the code gener-
ator is not a black box, but a living part of the
project. e variety of template-based solu-
tions for code generation can have a negative
in uence on acceptance by developers and
thus also the will to adapt.
In practice, code generators are therefore
much more successful when they themselves
are programs and can thus adapt to the famil-
iar tools. However, should the complexity of
the templates become too great, maintain-
ability and nding fault are far more di cult
than, for example, in a code generator that
was developed in C# and can debug normally
with Visual Studio. A particularly great ben-
e t from code generation can be achieved
Figure 1. Enterprise Architect
with the LieberLieber Embedded
Engineer extension
1...,10,11,12,13,14,15,16,17,18,19 21,22,23,24,25,26,27,28,29,30,...44
Powered by FlippingBook