Understanding Embedded Software Systems
Understanding Embedded Software Systems
Definition
Combination of computer hardware and software
Designed to perform a dedicated function
Examples
Everyday objects: watch, washing machines,
Critical systems: planes, space systems, cars.
Definition
Software used in embedded systems
Features
Low level programming, close to hardware
Constraints
low energy consumption
low computational power
real time constraints
reliability
... any constraints that apply to your dedicated function
Definition
Software used in embedded systems
Features
Low level programming, close to hardware
Constraints
low energy consumption
low computational power
real time constraints
reliability
... any constraints that apply to your dedicated function
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 7 / 62
Trends: What is developed ?
21
46%
New or different software features 50%
51%
37%
New or different processor 38%
39%
22%
New or different connectivity capabilities 24%
17%
19%
Mandatory changes/discontinued hdwr/sftwr 17%
17%
16%
New or different analog components 11%
10%
11%
New or different system logic 11%
15%
13%
New or different peripherals 14% 2019 (N = 521)
16%
2017 (N = 596)
10%
New or different operating system 10% 2015 (N = 851)
12%
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 8 / 62
Trends: Features ?
22
GPU* 9%
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 9 / 62
Trends: What language ?
32
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 10 / 62
Trends: What language ?
33
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 11 / 62
Organization of the Presentation
builder: make
compiler: gcc
linker: ld, gcc
debugger: gdb
[Link]
IMT-Atlantique Embedded Software 13 / 62
C vers assembleur
Unix systems
[Link]: ancester
coff: for shared libraries
elf: most known
FatELF: multi-ELF support
Windows / NT
PE, PE32+: current
MZ: DOS
iOS OSX
Mach-0: still used
On power-up
Hardware initialisation of the processor and peripherals
Execution of the code stored in ROM (BootROM on ZedBoard)
Stage 1: Bootloader
Most used: GRUB2(Linux), BOOTMGR(Windows), iBoot(iOS)
Load filesystem drivers, OS configuration file, needed modules
Load the kernel and start the OS
Stage 2: Kernel / OS
Init software is launched
Stage 1: FSBL
Set peripheral clock frequencies, initialize MIOs
Program fpga with bitstream
Load 2nd stage bootloader(OS) or user code (no OS)
Stage 2: U-Boot
Second stage boot loader
Initialize and test hardware (DDR, Serial, ...)
Load Kernel into RAM
A software that:
accesses the hardware
abstracts the hardware for read / write send / recv
OS
file socket
A software that:
accesses the hardware
abstracts the hardware for read / write send / recv
OS
file socket
A software that:
accesses the hardware
abstracts the hardware for read / write send / recv
OS
file socket
A software that:
accesses the hardware
abstracts the hardware for read / write send / recv
OS
file socket
OS
file socket
provides homogeneous and
generic interface cpu scheduling
memory
management usb
eth
controller
portability
corresponds to software
engineer skills
benefits from up to date
technology
OS
file socket
provides homogeneous and
generic interface cpu scheduling
memory
management usb
eth
controller
portability
corresponds to software
engineer skills
benefits from up to date
technology
OS
file socket
provides homogeneous and
generic interface cpu scheduling
memory
management usb
eth
controller
portability
corresponds to software
engineer skills
benefits from up to date
technology
OS
file socket
provides homogeneous and
generic interface cpu scheduling
memory
management usb
eth
controller
portability
corresponds to software
engineer skills
benefits from up to date
technology
60
50
40 35%
33% 31% 32%
30 28%
20
10
0
Yes No
2019 (N = 613) 2017 (N = 818) 2015 (N = 1,125) 2014 (N = 1,493) 2013 (N = 2,082)
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 28 / 62
Trends: OS
56
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 29 / 62
Trends: OS
57
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 30 / 62
Trends: OS
58
Base: Those who are considering an operating system in any project in the next 12 months
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 31 / 62
Trends: OS
59
20%
17% 15% 16%
10% 9%
4% 5% 6% 4% 5% 4% 5% 4% 7% 7%
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 32 / 62
Kernel vs OS
The interfaces between the applications and the kernel are the
system calls
Documented in the manual on most linux-based OSs in the
second section
Extract: man man
1 Executable programs or shell commands
2 System calls ( functions provided by the kernel )
3 Library calls ( functions within program libraries )
4 Special files ( usually found in / dev )
5 File formats and conventions eg / etc / passwd
6 Games
7 Miscellaneous ( including macro packages and conventions ) , e . g .
man (7) , groff (7)
8 System administration commands ( usually only for root )
9 Kernel routines [ Non standard ]
The interfaces between the applications and the kernel are the
system calls
Documented in the manual on most linux-based OSs in the
second section
Extract: man man
1 Executable programs or shell commands
2 System calls ( functions provided by the kernel )
3 Library calls ( functions within program libraries )
4 Special files ( usually found in / dev )
5 File formats and conventions eg / etc / passwd
6 Games
7 Miscellaneous ( including macro packages and conventions ) , e . g .
man (7) , groff (7)
8 System administration commands ( usually only for root )
9 Kernel routines [ Non standard ]
The interfaces between the applications and the kernel are the
system calls
Documented in the manual on most linux-based OSs in the
second section
Extract: man man
1 Executable programs or shell commands
2 System calls ( functions provided by the kernel )
3 Library calls ( functions within program libraries )
4 Special files ( usually found in / dev )
5 File formats and conventions eg / etc / passwd
6 Games
7 Miscellaneous ( including macro packages and conventions ) , e . g .
man (7) , groff (7)
8 System administration commands ( usually only for root )
9 Kernel routines [ Non standard ]
NAME
open , openat , creat - open and possibly create a file
SYNOPSIS
# include < sys / types .h >
# include < sys / stat .h >
# include < fcntl .h >
DESCRIPTION
Given a pathname for a file , open () returns a file
descriptor , a small ,
nonnegative integer for use in ...
+ everything included
+ inlining, compile-time optim
- customization, portability,
OS manageability
- memory footprint
- performance
+ everything included
+ inlining, compile-time optim
- customization, portability,
OS manageability
- memory footprint
- performance
+ everything included
+ inlining, compile-time optim
- customization, portability,
OS manageability
- memory footprint
- performance
+ maintainability
+ smaller footprint
module
OS module
+ less resource needed
module - indirection can impact
(interface)
module performance
- maintenance can still be an
issue
+ maintainability
+ smaller footprint
module
OS module
+ less resource needed
module - indirection can impact
(interface)
module performance
- maintenance can still be an
issue
+ maintainability
+ smaller footprint
module
OS module
+ less resource needed
module - indirection can impact
(interface)
module performance
- maintenance can still be an
issue
PCB
Process State (ready, running,
waiting,...)
s
ta
de
file
da
co
Program Counter
CPU registers reg
Scheduling information stack
Memory management
(Address space)
s
ta
ta
de
de
file
file
da
da
co
co
reg reg reg reg
stack stack stack stack
[Link]
IMT-Atlantique Embedded Software 45 / 62
Open Source
Free redistribution
Source code availability
Derived works allowance
Integrity of Author’s source code (not mandatory)
No discrimination against persons or groups
No discrimination agains fields of endeavor
Distribution of License
License must not be specific to a product
License must not restrict other software
License must be technology-neutral
[Link]
IMT-Atlantique Embedded Software 46 / 62
Open Source
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
+ Mostly free
- Reduced competitive
+ Free Support
advantage
+ Open standards
- Minimal support leverage
+ Tends to faster fixes
- Usability
+ Security
- Increase business risk
+ Avoids vendor lock-in
Soft:
Usefulness of a result degrades after deadline
Example: graphical interface, mouse input
Hard:
Failure if result is produced after dead linewidth
Example: Airbag, Inkjet printer
result usefulness result usefulness
100 % 100 %
0% time 0% time
deadline deadline
IMT-Atlantique Embedded Software 50 / 62
Real time
Soft:
Usefulness of a result degrades after deadline
Example: graphical interface, mouse input
Hard:
Failure if result is produced after dead linewidth
Example: Airbag, Inkjet printer
result usefulness result usefulness
100 % 100 %
0% time 0% time
deadline deadline
IMT-Atlantique Embedded Software 51 / 62
Real Time Embedded systems
Source: tr [Link]
IMT-Atlantique Embedded Software 52 / 62
Latencies
Latencies is the time between the time when a task should start and
when it really starts. Caused by:
Concurrent execution of
multiple OS on a single
hardware platform OS OS OS
Each OS acts as if it owned the
hardware
The Virtualization layer Virtualization
provides an interface that is
the same as the original
machine
exhibits minor performance Hardware
loss
has exclusive control of the
hardware
Consolidation (multiple OS on OS OS OS
a single hardware means
fewer machines, cost
efficiency) Virtualization
Isolation
security
intellectual property
Hardware
Migration cost
20%
17% 15% 16%
10% 9%
4% 5% 6% 4% 5% 4% 5% 4% 7% 7%
2019 Embedded Markets Study © 2019 Copyright by AspenCore. All rights reserved.
[Link]
Embedded_2019_Embedded_Markets_Study.pdf
IMT-Atlantique Embedded Software 58 / 62
Virtualization Layer
Service
Guest Guest Guest Guest Regular Regular
(privileged) Application Application
VM VM VM VM
VM
Qemu Qemu
Hypervisor KVM
Host OS
Hardware Hardware
Service
Guest Guest
VMM manages all hardware
(privileged)
VM
VM VM resources and supports
execution of the VMs
privileged service VM to deal
Hypervisor with devices
Examples:
x86: Xen (open source or
Hardware Citrix), EDX (VMware)
Embedded: OKL4, CrossOS