Nov 17, 2008 ... Software Development at T-Systems. ▫. The Best Language for Embedded
System Development? ▫. Java for Embedded Systems – Pro/Contra.
Embedded Software
Embedded System Development. Java vs. C++ Dr.-Ing. Ingo Elsen, Dr. rer. nat. Hans-Jürgen Habrock, Dipl.-Ing. Detlev Uhlenbrock
T-Systems International Systems Integration
T-Systems, Embedded System Development
17.11.2008
1
Embedded System Development. Agenda.
Software Development at T-Systems The Best Language for Embedded System Development?
Java for Embedded Systems – Pro/Contra C++ for Embedded Systems – Pro/Contra
Volere – Requirements and Constraints that drive the decision Example – Embedded Application with a large user base
Embedded Software
Requirements Basic function cores Application Speed, Size etc. Cost Drivers Candidates to improve performance and reduce cost
The decision, its impacts and its outcome Examples for Code migration Summary and Conclusion
T-Systems, Embedded System Development
17.11.2008
2
T-Systems Systems Integration International Delivery Network.
We serve our customers all over the world.
Embedded Software Points of Production
Points of Delivery
Brazil
Argentina
Hungary
Austria
Russia
Brazil China Czech Rep. France Hungary Iberia (ES/PT) Italy Japan Mexico Nordic (DK/SE)
Point of Delivery P&D
Russia Auto Services P&H Finance Telco Horizontal Point of Production
ADSF
Singapore South Africa Switzerland UK
ADSF ADF ASF TF SF
ADF ASF TF SF
USA
Concentration of industry know-how within P&D Industrialization of production within ADSF
T-Systems, Embedded System Development
17.11.2008
3
Structure of T-Systems Systems.
Integration Delivery Portfolio.
Embedded Software
Industries
Automotive Aerospace /Defense /Security Other Discrete Manufacture Industry Telecommunication Travel, Transport & Logistics Finance Public Healthcare
Horizontals
T-Systems, Embedded System Development
17.11.2008
4
T-Systems Systems Integration. Industrialized Software Development.
Embedded Software
Project Management (PM Book) Software-Engineering (SE Book) Project Model
Sales (Sales Book)
Requirement Specification Analyses
System Design
Programming
Integration
Rollout
ALM (SM Book)
Configuration Management Quality Assurance Software Development Environment Reengineering
Generators
System Landscapes
T-Systems, Embedded System Development
17.11.2008
5
Embedded System Development. The Best Language for Embedded System Development.
Is Yo ung, Is M
odern
e her w y ver E s Run
Real Object Oriented
y Eas
Lot o fO
erything v E t e g You
Safe d n a oved r P It’s Rule the
are Coo l
Co mp lex La ng ua ge
ool
ls, Tools, … Tools, Too n ear L to
If You K now th e Lang uage – You
Object Oriented Is C
Embedded Software
Old but Heavy Hardw ar
e
pen S ource
T-Systems, Embedded System Development
17.11.2008
6
Embedded System Development. Java for Embedded Systems.
Embedded Software
Contra
PRO
Huge knowledge base Large number of frameworks and open source code available. XML, Networking, Security and more are part of Java standard edition Write once, run everywhere Available Java optimized hardware (Java Microcontroller, J-J-Control, …) Component based design with frameworks (e.g. OSGI etc.) Fast prototyping capability Easy maintenance of Java based applications Large number of development tools also for testing, documentation and codecode-review JME (Micro Edition) for embedded system development. …
Must have operation system (OS) Overhead for memory and microprocessor VM Hardware abstraction layer Possible code optimization only with special compiler, no machine code No prediction of the runtime behavior except for RealReal-Time VMs based on RTSJ Specification OS specific middleware for hardware integration needed No direct access to hardware or OS functionality Difficulty in source code protection (Reengineering) …
T-Systems, Embedded System Development
17.11.2008
7
Embedded System Development. C++ for Embedded Systems.
Embedded Software
Contra
PRO
Huge knowledge base Large number of frameworks and open source code available. Generating of native machine code C/C++ based operating systems No need for special hardware or runtime environments (VM etc.) Support for virtually every microcontroller Component based design with frameworks Fast and small systems RealReal-time capability Large number of development tools also for Testing, Documentation and CodeCode-Review Direct hardware access Possible hardware and software code protection …
Complex debugging (e.g. Pointer) Complexity of language can lead to code that is difficult to understand Not enough free or open tools Not platform independent Different compiler behavior (e.g. MS, Intel, gcc, gcc, Portland) …
T-Systems, Embedded System Development
17.11.2008
8
Embedded Software
Java vs. C++ Example for an Embedded Development.
T-Systems, Embedded System Development
17.11.2008
9
Embedded System Development. Volere – Requirements and Constraints that drive the decision
Embedded Software
Customer
Concept Phase
Specification Phase
Design Phase
Build Phase
Business Case Feature List Wishes and Ideas Business Requirements 1. Level System Requirements 1. Level System Architecture Constraints
Integration Phase
Test Phase
Target Costs
T-Systems, Embedded System Development
17.11.2008
10
Embedded System Development. Basic Requirements and Constrains.
Limited CPU performance
Limited Space and Weight Prototypes, Small number of Units, Mass-Products
Software Update
E.g. RS-232, USB, SPI, CAN, LCD, ADC/DAC, GPIO, SD-Card
Limited Cost
CPU
Small Size
Power Consumption Microcontroller vs. FPGA
Small memory footprint (RAM, ROM, Flash etc.) Defined Hardware Interfaces
Embedded Software
Special Processes, Methods (e.g. SD-Card, USB) Component Update or Complete Update
Environment Constrains
Thermal, Size, Robustness, Usability Size and Type of HMI (e.g. LCD, Keyboard)
Source: www.atmel.com
T-Systems, Embedded System Development
17.11.2008
11
Embedded System Development. Example - Embedded Application with a Large User Base. Introduction and Requirements.
Embedded Software
Example Road Charge System
Embedded system unit for road charging
Large number of units Very reasonable price
Essential Use Cases
Determine GPS position Map geogeo-position to geogeo-object (e.g. roads) Calculate the road charge Communication via GPRS/GSM/UMTS with central system Transfer road charge data to central system for billing Update data for road charge models and maps Software update
T-Systems, Embedded System Development
17.11.2008
12
Embedded System Development. Development Process .
Embedded Software
Error and Changes
Specification Software Debugging
Unit Test
Implementation
Code Code Documentation Review
Components Test
Delivery
Integration Acceptance & Test Test
Hardware Debugging
Embedded System
T-Systems, Embedded System Development
17.11.2008
13
Embedded System Development. Development Process (Specification). Structure diagrams
Class diagram Component diagram Composite structure diagram Object diagram Deployment diagram
Behavior diagrams
Activity diagram State diagram Use case diagram
Embedded Software
UML Models
Enterprise Architect
Documentation
Specification
Interaction diagrams
Communication diagram Interaction overview diagram Sequence diagram Timing diagrams
MS Office Requirements
Business Requirements Customer Requirements System Requirements Functional Requirements Performance Requirements Design Requirements Derived Requirements Allocated Requirements
Requirements
DOORS
T-Systems, Embedded System Development
17.11.2008
14
Embedded System Development. Dynamic Model View.
Embedded Software
Error & Changes
Classic Process Specification Implementation Code and binaries test and verification
Specification
Implementation
Error & Changes
Error & Changes
Specification
Test Verification
Test Verification
Implementation
Test Verification
Model Driven Process Specification Model test and verification Implementation Code and binaries test and verification
Dynamic Model Test and Verification Test & Verification
Use Cases UML Model
OCL Expressions OCL Constraints
Dynamic Model
T-Systems, Embedded System Development
17.11.2008
15
Embedded System Development. Development Process – Java (Implementation).
Embedded Software
Java IDE
Specification
Java IDE
Source Code
Editor Compiler Debugger Make, Build Unit Test Code Documentation Code Review
Byte Code Software Debugging
Version and Configuration Management System
Debugger Environment Java VM
T-Systems, Embedded System Development
17.11.2008
16
Embedded System Development. Development Process – C++ (Implementation).
Embedded Software
C/C++ IDE
Specification
C/C++ IDE
Editor Compiler, Cross-Compiler Linker Debugger, Remote Debugger Make, Build Unit Test Code Documentation Code Review
Source Code
Software Debugging
Version and Configuration Management System
Hardware Remote Debugging
Binaries
Software Simulator
Hardware Simulator
T-Systems, Embedded System Development
17.11.2008
17
Embedded System Development. Development Process – C++ (Software Remote Debugging).
Linux (Reference Platform)
Windows XP
Source
Embedded Software
Application [C++]
IDE C++
Eclipse
API & Hardware Simulation Ethernet gdb – Debugger (Client) Debugging Environment
(TCP/IP)
Simulation Database
gdb – Remote Debugger (Server) Runtime Environment
T-Systems, Embedded System Development
17.11.2008
18
Embedded System Development. Development Process – C++ (Daily Build Process).
Preparation
Update source code and test data repository Build binaries (Compile and link all sources)
SVN Update
Verification of methods (Unit Test) Verification of Unit Test coverage (LCov) Low level use case and component test (Module Test) Generation of source code documentation (Doxygen) Code review (PCLint) Source code metrics and quality analysis (RSM)
Create reports
Linux Script
Performing test, review and verification processes
Embedded Software
Build Binaries Perform Unit Test
Perform LCov
Perform Module Test
Evaluate, analyze report and results
Performing source code modification and error correction
Reports
Code modification and documentation Code error correction and documentation
Perform Doxygen
Perform PCLint
Perform RSM
T-Systems, Embedded System Development
17.11.2008
19
Embedded System Development. Cost Drivers - Candidates to Reduce Cost.
ARM9
CPU
ARM7
256MB
RAM
128MB
512MB
ROM
256MB
VM + JNI
VM
X
Framework
OSGI
X
400Mhz
Embedded Software
200Mhz
T-Systems, Embedded System Development
17.11.2008
20
Embedded System Development. The decision, its impacts and its outcome. 10€
15€
Operating System
Virtual Machine
Framework
Embedded Software
Contribution = 50€/Unit
10€
15€
Required Memory
Required CPU
Embedded System
Concept Phase Development
10€ Operating System
Software development with C++ Development of the framework Use of Linux operating system Smaller memory footprint
10€
Required Memory
Required CPU
Contribution = 25€/Unit
Outcome
Impacts
Decision
Framework
5€
Higher development costs Complex test and debugging Additional software simulations
Binaries with small memory footprint IP for framework and application Very reasonable price for the complete embedded system
T-Systems, Embedded System Development
17.11.2008
21
Embedded System Development. Example: C++ Code Base – Code and Data Share. C++ Source Code and Data Total 640 MByte
Embedded Software
Embedded System Binaries Total 157 MByte
Without management data (PM/SE) Without miscellaneous code and data (e.g. simulation, scripts)
T-Systems, Embedded System Development
17.11.2008
22
Embedded System Development. Examples for Code migration.
Embedded Software Road Charge Application Pricing models User Interface (HMI) Road charge calculation
Application [C++]
Services for Application Security Geo-mapping Diagnosis Navigation Communication Update
Framework [C++]
Drivers
e.g. Windows, Linux, VxWorks, QNX
Operating System
e.g. Windows, Linux, VxWorks, QNX
Operating System
SIM
SD-Card
IRM
µWM
GSM
LCD
GPS
SIM
SD-Card
IRM
µWM
GSM
Key
LCD
GPS
Application Program Interface
Embedded Hardware
Embedded Hardware
Key
Drivers
API [C++] Hardware Abstraction Layer
T-Systems, Embedded System Development
Hardware and OS independent access to hardware modules, drivers and OS
Hardware Modules
Customer specific modules
17.11.2008
23
Embedded System Development. Summary and Conclusion.
Embedded Software
Java vs. C++
No winner – chose the one that fulfills customers needs in the best way One size doesn’t fit all Do not chose your tools, architectures and designs by reflex The system domain determines the best fit, that includes more than software, even more than hardware Cost Share per Unit Learn something about programming, how to choose the best fitting technology Focused on technology issues but rarely considering things like maintainability and total costs
140 120 100
% (C++ = 100%)
80
Hardware
110
88
60
Development
40 20
12
11
0
Java
C++
Development Concept
T-Systems, Embedded System Development
17.11.2008
24
Embedded Software
Thank You… Dr.-Ing. Ingo Elsen, Dr. rer. nat. Hans-Jürgen Habrock, Dipl.-Ing. Detlev Uhlenbrock
[email protected]
ADF ISS ES
T-Systems, Embedded System Development
17.11.2008
25
Imprint Embedded Software
Visit us at http://www.t-systems.com
Copyright © 2008 by T-Systems Enterprise Services GmbH. All rights reserved, also those regarding the reprint in extracts, the reproduction/copying (including microfiche and electronic reproduction) as well as the evaluation by data banks or similar systems.
T-Systems, Embedded System Development
17.11.2008
26
Embedded System Development. Services, IPC & Software Update – C++.
Embedded Software
Update Process
Middleware
Provides communication function for
Data exchange
Data object exchange
Message queue
Provides status information about services
Start, running, stop
Application as services
API
…
Service n
Service 3
…
Service 2
Middleware
Service 1
Service n
Service 3
Service 2
Service 1
Stop service Kill service process Copy new service executable Execute new service Service connects to middleware Start service
Drivers
e.g. Embedded Windows, Linux, VxWorks, QNX
Operating System
Execution of services as single applications
Use of API function to access the operating system and hardware
Use of middleware to communicate with other services
API
Embedded Hardware
T-Systems, Embedded System Development
Provides function to access the operating system and hardware
17.11.2008
27