Embedded Linux for Desktop Software Developers

Transcription

Embedded Linux for Desktop Software Developers
Embedded Linux for Desktop
Software Developers
David Andrey, NetModule AG
Introduction
What’s the matter?
The performance of Embedded Systems is rapidly increasing. Applications which
used to require a separate PC can now be run directly on the embedded target.
Examples are control applications with complex GUIs, cloud applications etc. To
implement those applications often network services, number crunching libraries,
databases or a webserver is needed.
Why is this a problem?
There are still some restrictions in the embedded world which make porting
applications from the desktop a difficult endeavor, if not impossible.
How can we solve it?
This presentation aims to explain what needs to be considered when developing for
an embedded target, the technologies that facilitate your work and make
embedded coding more efficient.
© 2014 NetModule AG
Slide 2
NetModule Company Profile
HQ
NetModule AG
Niederwangen
Branch Office
NetModule AG
Winterthur
Branch Office
NetModule AG
Basel
Subsidiary
NetModule GmbH
Frankfurt
Subsidiary
NetModule Asia
Hong Kong
We enable customers to integrate and use state-of-the-art Communication &
Internet Technologies in their Embedded Systems.
© 2014 NetModule AG
Founded :
1998
Employees :
40
Certifications :
ISO 9001 & 13485
Slide 3
Considerations
The following must be considered when moving from desktop to
embedded:
• Multiplatform application support
•
Several operating systems
•
Different hosts (PC, mobile, embedded)
• State-of-the-art development environment
•
IDE
•
Debugger
•
Profiler
• Modern programming environment
•
Efficient and easy
•
Support for GUIs etc.
© 2014 NetModule AG
Slide 4
Development Setup
Desktop
Development
Embedded CrossDevelopment
Embedded Native
Development
Development
PC
Target =
Development PC
Development
PC = Target
Target
Infrastructure
Infrastructure
Infrastructure
Advantage
• Multi platform
development
• Performance
• Build time
• Native
development
Disadvantage
• Slightly limited
debugging
• Performance
• Full toolchain on
target needed
Preferred setup
© 2014 NetModule AG
Slide 5
Development Workflow
1. BSP & Tools
2. Target Setup
3. Application Development
I.
I.
I.
Create
development
environment
First Installation
procedure
Install Application Development
Kit
II. Update procedure II. Develop your application
II. Create target
image
III. Create Application Release.
There are two variants.
III. Generate file
systems for
rescue, developer
and productive
operating system
a. Integrate application into
build environment for
automatic integration into
Linux images
b. Keep separate from build
environment and create
installer (.deb, .rpm)
 NetModule can do all of those services for you or only support
where needed
© 2014 NetModule AG
Slide 6
Infrastructure
The same as for Desktop Development
•
Source Control
•
Continuous Integration
•
Release Management
•
Static Code Analysis
•
Regression Testing
Challenges specific to Embedded Development
•
Efficient Development Setup
•
Automatic Testing (interaction might be needed)
© 2014 NetModule AG
Slide 7
Welcome To The World of Linux
So what should you choose and where to start?
© 2014 NetModule AG
Slide 8
Linux Distribution
The choice of a suitable Linux Distribution is important:
•
Availability of packages (Webserver, Databases, Libraries etc)
•
Support for modern frameworks and programming languages (Qt, Java,
Python)
 As close as possible to a desktop distribution but needs to be
suitable for embedded targets:
•
Startup time
•
Resource usage
NetModule proposes Yocto (Poky):
•
Availability of Vendor/Manufacturer support
•
Best tradeoff between desktop and embedded
© 2014 NetModule AG
Slide 9
Programming Language / Framework
Use a modern programming language that:
•
Is well-known, easy and efficient
•
Has support for GUIs, databases etc.
NetModule proposes the Qt cross-platform application and UI
Framework:
•
Qt includes all the middleware
components we should not
re-invent again.
•
Qt provides useful templates
•
Qt enhances the C++ language
But why not Java?
•
Can also be a suitable choice
•
A lot depends on the experience of the developer and priorities in the project
•
However, Qt can be twice as efficient in execution time and memory
footprint as Java
© 2014 NetModule AG
Slide 10
Application Design
Software Architecture
•
Generic part must be platform independent
•
Well-defined interfaces
Hardware Abstraction Layer
•
Optionally simulate on PC
•
Hardware specific implementation(s) on target(s)
© 2014 NetModule AG
Slide 11
Development Environment
Qt Creator
•
Can also serve as a generic IDE for development in C, C++
•
Remote debugging
•
Requires a Linux installation for Embedded Linux development (toolchain)
Eclipse
•
Generic IDE
•
Remote debugging
•
Plugin for remote development allows cross-platform compilation
NetModule proposes Qt Creator:
•
Stable environment
•
Resource efficient
•
Your favorite Editor (Vim, Emacs etc) is welcome too :-)
© 2014 NetModule AG
Slide 12
Summary
Developing for Embedded is no rocket science if you are familiar with
desktop programming:
1.
Make sure you have an state-of-the-art infrastructure
2.
Choose a suitable Linux distribution
3.
Select the programming language / framework
4.
Design your application as platform independent as possible
5.
Pick a development environment that allows efficient coding and debugging
© 2014 NetModule AG
Slide 13