© 1
Embedded Software Made Easy
Embed your Ideas
Embedded Software Made Easy
A connected chief hat reading you a recipe you selected by voice control and waiting you at each step with a voice signal before continuing to the next one.
Let’s take an example
2
Embedded Software Made Easy
The following content is • Under the software point-of-view. • Is simplified for a broader audience. • Opinionated by 25 years of farjump’s team
experience.
Warning
3
Embedded Software Made Easy 4
Before we get started: Hardware vs Software
Hardware
Embedded Software Made Easy 4
Before we get started: Hardware vs Software
Hardware
General-PurposeSingle-Purpose
Embedded Software Made Easy 4
Before we get started: Hardware vs Software
Hardware
CPUMCUASIC GPU
General-Purpose
DSP
Single-Purpose
I/O Peripheral
Embedded Software Made Easy 4
Before we get started: Hardware vs Software
Hardware
CPUMCUASIC GPU
General-Purpose
DSP
Single-Purpose
I/O Peripheral
May contain a General-Purpose CPU
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
ComputingI/O
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
ASIC GPU
Computing
DSP
I/O
I/O Peripheral
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
CPUMCUASIC GPU
Computing
DSP
I/O
I/O Peripheral
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
CPUMCUASIC GPU
Computing
DSP
The Hardware/Software Interface (HSI)
I/O
I/O Peripheral
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
CPUMCUASIC GPU
Computing
DSP
The Hardware/Software Interface (HSI)
I/O
We (the software people) are here
I/O Peripheral
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
CPUMCUASIC GPU
Computing
DSP
The Hardware/Software Interface (HSI)
I/O
We (the software people) are here
I/O Peripheral
Managed by internal (embedded) software
Embedded Software Made Easy 5
Before we get started: Hardware vs Software
Hardware
CPUMCUASIC GPU
Computing
DSP
The Hardware/Software Interface (HSI)
I/O
We (the software people) are here
I/O Peripheral
Managed by internal (embedded) softwareExternally controlled by
Computing Hardware
Embedded Software Made Easy
System-on-Chip (SoC)
Before we get started: Hardware vs Software
T h e g e n e r a l - p u r p o s e computing hardware you deal with is in fact compound of many specialised sub-units.
CPU
I/OCoreI/O
6
Tree map of usual sub-units in a SoC
MCU
CPU
I/OCoreI/O
Tree map of usual sub-units in a MCU
Memory
Embedded Software Made Easy
System-on-Chip (SoC)
Before we get started: Hardware vs Software
T h e g e n e r a l - p u r p o s e computing hardware you deal with is in fact compound of many specialised sub-units.
CPU
I/OCoreI/O
6
Tree map of usual sub-units in a SoC
Somehow, this is your software which specialises it. Once it is
embedded in a closed system, its purpose is fixed.
MCU
CPU
I/OCoreI/O
Tree map of usual sub-units in a MCU
Memory
Embedded Software Made Easy 7
Before we get started: Hardware vs Software
Example of an ARM SoC
Embedded Software Made Easy 8
Before we get started: Hardware vs Software
Example of the Intel 8021 Microcontroller
Embedded Software Made Easy 9
Before we get started: Hardware vs Software
HSI
Level of Software
Abstraction
Hardware
Embedded Software Made Easy 9
Before we get started: Hardware vs Software
Low-Level Software
HSI
Level of Software
Abstraction
Hardware
Embedded Software Made Easy 9
Before we get started: Hardware vs Software
Low-Level Software
HSI
FirmwareBare-metal
Level of Software
AbstractionSystem Call
Operating System
Hardware
Embedded Software Made Easy 9
Before we get started: Hardware vs Software
Low-Level Software
HSI
FirmwareBare-metal
Level of Software
Abstraction
API
System Call
Runtime SystemLibrary
Operating System
Hardware
OS Service
Embedded Software Made Easy 9
Before we get started: Hardware vs Software
Low-Level Software
HSI
FirmwareBare-metal
Level of Software
Abstraction
API
System Call
Runtime SystemLibrary
Program
Operating System
Hardware
OS Service
Embedded Software Made Easy 9
Before we get started: Hardware vs Software
Low-Level Software
HSI
FirmwareBare-metal
Level of Software
Abstraction
API
System Call
Runtime SystemLibrary
Program
Operating System
Hardware
Be very careful with that…
OS Service
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
10
Embedded Software Made Easy
We need to break down the idea.
Challenge #1 - How do I know what should be software and hardware?
10
Embedded Software Made Easy
We need to break down the idea.
Challenge #1 - How do I know what should be software and hardware?
10
Embedded Software Made Easy
We need to break down the idea.
Challenge #1 - How do I know what should be software and hardware?
10
Recipe Search Recipe ReadingPower Button
Embedded Software Made Easy
We need to break down the idea.
Challenge #1 - How do I know what should be software and hardware?
10
Recipe Search Recipe ReadingPower Button
Note that these are the user interfaces…
Is that enough…?
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
11
Recipe Search
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
11
Speech Recognition
Recipe Search
Text-to-Speech
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
11
Speech Recognition
Recipe Search
Text-to-Speech
Microphone
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
11
Speech Recognition
Speaker
Recipe Search
Text-to-Speech
Microphone
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
11
Speech Recognition
Speaker
Recipe Search
Text-to-Speech
Microphone
Hardware
Software
Embedded Software Made Easy
Hardware
Software
Challenge #1 - How do I know what should be software and hardware?
12
Recipe Reading
Speech Recognition
Speaker
Step-by-Step Processing
Text-to-Speech
Microphone
Embedded Software Made Easy
Software
Hardware
Challenge #1 - How do I know what should be software and hardware?
13
Power Button
Boot Usually handled by an OS driver
Power On Power Off
Power Unit
Power Events
Usually handled by a firmware and
bootloader
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
14
The basic general picture for now
Embedded Software Made Easy
Challenge #1 - How do I know what should be software and hardware?
14
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
The basic general picture for now
Recipe Search Recipe Reading
Embedded Software Made Easy
Hardware
Challenge #1 - How do I know what should be software and hardware?
14
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
The basic general picture for now
Recipe Search Recipe Reading
Embedded Software Made Easy
Hardware
I/Os
Challenge #1 - How do I know what should be software and hardware?
14
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
The basic general picture for now
Recipe Search Recipe Reading
Embedded Software Made Easy
Hardware
Computing
I/Os
Challenge #1 - How do I know what should be software and hardware?
14
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
The basic general picture for now
Recipe Search Recipe Reading
Embedded Software Made Easy
Software
Hardware
Computing
I/Os
Challenge #1 - How do I know what should be software and hardware?
14
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
The basic general picture for now
Recipe Search Recipe Reading
Embedded Software Made Easy
Software
Hardware
Computing
I/Os
Challenge #1 - How do I know what should be software and hardware?
14
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
Executed by a CPU
The basic general picture for now
Recipe Search Recipe Reading
Embedded Software Made Easy
Software
Hardware
Computing
I/Os
Challenge #1 - How do I know what should be software and hardware?
14
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
Managed by drivers
Executed by a CPU
The basic general picture for now
Recipe Search Recipe Reading
Embedded Software Made Easy
Software
Hardware
Computing
I/Os
Challenge #1 - How do I know what should be software and hardware?
15
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
But we still don’t know what it exactly looks like…
Recipe Search Recipe Reading
Embedded Software Made Easy
Software
Hardware
Computing
I/Os
Challenge #1 - How do I know what should be software and hardware?
15
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
Which exact I/Os?
But we still don’t know what it exactly looks like…
Recipe Search Recipe Reading
Embedded Software Made Easy
Software
Hardware
Computing
I/Os
Challenge #1 - How do I know what should be software and hardware?
15
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
Which exact CPU? Which exact I/Os?
But we still don’t know what it exactly looks like…
Recipe Search Recipe Reading
Embedded Software Made Easy 16
We need to scale the hardware to our precise needs.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 16
We need to scale the hardware to our precise needs.
Challenge #2 - How do I select the hardware?
Having a « chicken and egg » problem?
Embedded Software Made Easy 17
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 17
Use an empirical approach by prototyping starting from the first observations & deductions. Then test & evaluate and repeat further specifying your hardware until you reach your local optimum.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 17
Use an empirical approach by prototyping starting from the first observations & deductions. Then test & evaluate and repeat further specifying your hardware until you reach your local optimum.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 17
Use an empirical approach by prototyping starting from the first observations & deductions. Then test & evaluate and repeat further specifying your hardware until you reach your local optimum.
When you have no idea of a starting point, start with an XXL superset of hardware, rich enough to run your idea, and create a functional prototype.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 18
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 18
Note that:• This process can be endless. It only depends on
what you are trying to accomplish. So be as lean as possible here ;-)
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 18
Note that:• This process can be endless. It only depends on
what you are trying to accomplish. So be as lean as possible here ;-)
• This is the moment where you may start doing hardware development in parallel of your software development: once the hardware chosen, the hardware team keeps further specifying it while you can start the software development.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
• Your physical constraints (space, weight, power, etc.).
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
• Your physical constraints (space, weight, power, etc.).• Your I/O requirements, including the interfaces with the
CPU.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
• Your physical constraints (space, weight, power, etc.).• Your I/O requirements, including the interfaces with the
CPU.• Your computing requirements.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
• Your physical constraints (space, weight, power, etc.).• Your I/O requirements, including the interfaces with the
CPU.• Your computing requirements.
And only targeting the current stage of your product:
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
• Your physical constraints (space, weight, power, etc.).• Your I/O requirements, including the interfaces with the
CPU.• Your computing requirements.
And only targeting the current stage of your product:
1. Research
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
• Your physical constraints (space, weight, power, etc.).• Your I/O requirements, including the interfaces with the
CPU.• Your computing requirements.
And only targeting the current stage of your product:
1. Research
2. Development
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 19
In any case, the overall goal here is to make compromises between:
• Your physical constraints (space, weight, power, etc.).• Your I/O requirements, including the interfaces with the
CPU.• Your computing requirements.
And only targeting the current stage of your product:
1. Research
2. Development
3. Production
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 20
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 20
The IoT gives us a very unique chance in the embedded world: it has the same I/O interfaces and peripheral as our mainstream general-purpose personal computers.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 20
The IoT gives us a very unique chance in the embedded world: it has the same I/O interfaces and peripheral as our mainstream general-purpose personal computers.
Which means that you can connect your IoT I/O peripherals to your own workstation to start prototyping!
Challenge #2 - How do I select the hardware?
Functional Prototype
Your OS
Your Workstation
Text-to-Speech Speech Recognition
Hardware
Recipe Search Recipe Reading
Software
Embedded Software Made Easy 20
The IoT gives us a very unique chance in the embedded world: it has the same I/O interfaces and peripheral as our mainstream general-purpose personal computers.
Which means that you can connect your IoT I/O peripherals to your own workstation to start prototyping!
Challenge #2 - How do I select the hardware?
Functional Prototype
Your OS
Your Workstation
Text-to-Speech Speech Recognition
Hardware
Recipe Search Recipe Reading
Software
Assuming your OS has the driver (otherwise
implement it?)…
Embedded Software Made Easy 21
Going back to our chief hat!
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 22
I/O Requirements
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy
Challenge #2 - How do I select the hardware?
23
It is made of single-purpose hardware which are selected according to their characteristics and our requirements.
I/OsPower Button Speaker Microphone
Embedded Software Made Easy
Challenge #2 - How do I select the hardware?
23
It is made of single-purpose hardware which are selected according to their characteristics and our requirements.
I/OsPower Button Speaker Microphone
A push button A speaker for human ears…
A mic for human sounds…
Embedded Software Made Easy
Challenge #2 - How do I select the hardware?
24
I/OsPower Button Speaker Microphone
A push button A speaker for human ears…
A mic for human sounds…
Embedded Software Made Easy
Challenge #2 - How do I select the hardware?
24
It gives us our first CPU requirements:
I/OsPower Button Speaker Microphone
A push button A speaker for human ears…
A mic for human sounds…
Embedded Software Made Easy
Challenge #2 - How do I select the hardware?
24
It gives us our first CPU requirements:• They must be somehow connected to the CPU
using their interfaces (SPI, USB, PCIe…).
I/OsPower Button Speaker Microphone
A push button A speaker for human ears…
A mic for human sounds…
Embedded Software Made Easy
Challenge #2 - How do I select the hardware?
24
It gives us our first CPU requirements:• They must be somehow connected to the CPU
using their interfaces (SPI, USB, PCIe…).• They have bandwidth requirements of several
kbits/s.
I/OsPower Button Speaker Microphone
A push button A speaker for human ears…
A mic for human sounds…
Embedded Software Made Easy 25
Computing Requirements
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 26
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 26
Select a processor according to: • The kind of software you need to execute. • Your I/Os requirements. • Your physical constraints (power
consumption, temperature, etc.).
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 27
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 27
There are two main kind of processors:
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 27
There are two main kind of processors:• Computing-oriented: fast CPU with lots of
fast memory for CPU-bound programs (e.g., image processing).
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 27
There are two main kind of processors:• Computing-oriented: fast CPU with lots of
fast memory for CPU-bound programs (e.g., image processing).
• I/O-oriented: large I/O bandwidth, optimised I/O bridge for I/O-bound programs (e.g., a web server).
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 28
• CPU-bound programs scale according to the computing power of the CPU.
• I/O-bound programs scale according to the power of the CPU required to manage these I/Os.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 29
So what kind of software do we run?
Challenge #2 - How do I select the hardware?
Drivers
Text-to-Speech Speech Recognition
Recipe Search Recipe ReadingAt run-time, most of the execution time will be probably spent in the speech algorithms. Which makes this software CPU-bound.
Embedded Software Made Easy 30
So what kind of software do we run?
Challenge #2 - How do I select the hardware?
Drivers
Text-to-Speech Speech Recognition
Recipe Search Recipe ReadingOr not? Speech recognition is complex enough to require a huge amount of computing power we can’t afford in our embedded system. So let’s make benefit from the « I » of IoT and let’s implement this unit in the cloud.
Embedded Software Made Easy 31
So what kind of software do we run?
Challenge #2 - How do I select the hardware?
Drivers
Text-to-Speech Speech Recognition
Recipe Search Recipe ReadingSo now, most of its execution time is spent waiting for I/Os to complete: sending requests to a speech server in the cloud and driving the speakers & microphone. Our software is I/O-bound.
Embedded Software Made Easy 32
And don’t forget about the new hardware and
software now required:
Challenge #2 - How do I select the hardware?
Software
Hardware
Computing
I/Os
Drivers
Power Button Speaker Microphone
CPU
Text-to-Speech Speech Recognition
HSI
Recipe Search Recipe Reading
Network Interface Controller
Network Stack
Embedded Software Made Easy 33
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 33
Our CPU should include:
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 33
Our CPU should include:• The interfaces required to connect with our I/
O peripherals, unless already present in the selected CPU/SoC/MCU.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 33
Our CPU should include:• The interfaces required to connect with our I/
O peripherals, unless already present in the selected CPU/SoC/MCU.
• Enough computing and I/O power to run our peripherals and our software fast enough for audio processing.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 34
Running benchmarks are necessary when you have to further refine your assumptions to get closer to the perfect hardware set.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 35
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 35
Running benchmarks in a bare-metal execution environment is a good practice to:
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 35
Running benchmarks in a bare-metal execution environment is a good practice to:
• Be alone in the CPU and get rid of hardware side-effects coming from concurrent or parallel software.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 35
Running benchmarks in a bare-metal execution environment is a good practice to:
• Be alone in the CPU and get rid of hardware side-effects coming from concurrent or parallel software.
• Be at the lowest software abstraction level, above the HSI, to fully understand what’s going on during the benchmark.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 35
Running benchmarks in a bare-metal execution environment is a good practice to:
• Be alone in the CPU and get rid of hardware side-effects coming from concurrent or parallel software.
• Be at the lowest software abstraction level, above the HSI, to fully understand what’s going on during the benchmark.
• Do whatever you want.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 36
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 36
To do so…:
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 36
To do so…:• Select a JTAG probe compatible with your
CPU
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 36
To do so…:• Select a JTAG probe compatible with your
CPU• affordable
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 36
To do so…:• Select a JTAG probe compatible with your
CPU• affordable• implementable in less than a week
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 36
To do so…:• Select a JTAG probe compatible with your
CPU• affordable• implementable in less than a week• with documentation & support
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 37
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 37
Or you can use instead Alpha, a GDB server, which brings:
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 37
Or you can use instead Alpha, a GDB server, which brings:
• the ability to run standard C (malloc, fprintf, etc.) programs bare metal with the support of GDB.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 37
Or you can use instead Alpha, a GDB server, which brings:
• the ability to run standard C (malloc, fprintf, etc.) programs bare metal with the support of GDB.
• a bare metal execution environment ready-to-use.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy 37
Or you can use instead Alpha, a GDB server, which brings:
• the ability to run standard C (malloc, fprintf, etc.) programs bare metal with the support of GDB.
• a bare metal execution environment ready-to-use.
Without any single JTAG probe.
Challenge #2 - How do I select the hardware?
Embedded Software Made Easy
Challenge #3 - How do I choose the right software architecture?
38
Low-Level Software
FirmwareBare-metal
Level of Software
Abstraction
API
System Call
Runtime SystemLibrary
Program
Operating System
OS Service
By understanding the main roles in this diagram:
Embedded Software Made Easy
• Started by the hardware from a read-only memory (flash, etc.).
• Given the constraints of its hardware environment, it is usually reserved for very special cases like booting hardware units (CPU, GPU, etc.).
Challenge #3 - How do I choose the right software architecture?
39
Firmware
Embedded Software Made Easy
Challenge #3 - How do I choose the right software architecture?
40
Bare-Metal
Embedded Software Made Easy
• Started by a firmware.• No abstraction but the one performed by the firmware(s).• Lowest-level software, right next to the HSI.• Doesn’t use any OS but usually libraries provided in the CPU/
SoC/MCU SDK, from simple helper functions to full network stacks.
Challenge #3 - How do I choose the right software architecture?
40
Bare-Metal
Embedded Software Made Easy
• Started by a firmware.• No abstraction but the one performed by the firmware(s).• Lowest-level software, right next to the HSI.• Doesn’t use any OS but usually libraries provided in the CPU/
SoC/MCU SDK, from simple helper functions to full network stacks.
Used when:
✓ There is not enough memory for a complete OS.
✓ High-performance computing software.
Challenge #3 - How do I choose the right software architecture?
40
Bare-Metal
Embedded Software Made Easy
Challenge #3 - How do I choose the right software architecture?
41
Operating System
Embedded Software Made Easy
• Started by an OS-loader.
The two sides of an operating system:
1. Manages the hardware.
2. Provides a software abstraction of it with its own standard or specific interface.
Challenge #3 - How do I choose the right software architecture?
41
Operating System
Embedded Software Made Easy
Challenge #3 - How do I choose the right software architecture?
42
Operating System
Embedded Software Made Easy
Like any other software, consider its features and use the one that best matches your needs.
Challenge #3 - How do I choose the right software architecture?
42
Operating System
Real-Time Support
Safety Security Standard API
Standard API
Driver APIs
Tooling
Embedded Software Made Easy
• Started by the OS. • Benefits from the abstraction of its language
library, runtime, shared libraries, etc.
Challenge #3 - How do I choose the right software architecture?
43
Program
Embedded Software Made Easy
Use any language you like, the one you feel confident with to implement your features…
Challenge #3 - How do I choose the right software architecture?
44
Program
Embedded Software Made Easy
Use any language you like, the one you feel confident with to implement your features…
Challenge #3 - How do I choose the right software architecture?
44
Program
C++
GoPython
C
NodeJS
Java
Embedded Software Made Easy
Use any language you like, the one you feel confident with to implement your features…
Challenge #3 - How do I choose the right software architecture?
44
Program
C++
GoPython
C
NodeJS
JavaCorrectly managing errors is a feature…
…that some languages provide built-in!
Embedded Software Made Easy
Chief Hat Program
Our connected chief hat requires enough high-level features, such as a network stack or a power event handler, that are good candidates to start at least prototyping using Linux on a simple ARM SoC include a network controller (e.g., wifi). The main advantage of using Linux being its amazing development tooling…
Challenge #3 - How do I choose the right software architecture?
45
Linux
Power Button Speaker Microphone
ARM
Text-to-Speech Speech Recognition
Recipe Search Recipe Reading
Network Interface Controller
Network StackARM Kernel Drivers
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
Hardware
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Called the « target »
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Called the « target »Called the
« remote » link
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Called the « target »Called the « host »Called the
« remote » link
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Called the « target »Called the « host »Called the
« remote » link
Cross-Toolchain
Embedded Software Made Easy 46
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Called the « target »Called the « host »Called the
« remote » link
Cross-Toolchain
Tools to be executed on your workstation to manipulate « target » software.
Embedded Software Made Easy 47
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Called the « target »Called the « host »Called the
« remote » link
Cross-Compiler
Tools to be executed on your workstation to manipulate « target » software.
Embedded Software Made Easy 47
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Any kind of link
Called the « target »Called the « host »Called the
« remote » link
Tools to be executed on your workstation to manipulate « target » software.
Cross-Compiled Program
Embedded Software Made Easy 48
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Cross-Compiled Program
Any kind of link
Embedded Software Made Easy 48
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Cross-Compiled Program
Any kind of link
Embedded Software Made Easy 48
Challenge #4 - How do I do embedded programming?
HardwareYour Workstation
Cross-Compiled Program
Any kind of link
Not working? Do it again...
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
49
It’s still such a « hard » world…
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
50
In such « hard » world…
Can we make it easier for Bob, its
teammates, its boss?
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
51
HardwareYour Workstation
Cross-Compiled Program
Firstly…
OS
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
51
HardwareYour Workstation
Cross-Compiled Program
Cross-GDB
GDB is the recommended tool. It allows to embed, debug and test the program, in one single amazing tool.
Firstly…
OS
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
51
HardwareYour Workstation
Cross-Compiled Program
Cross-GDB
GDB is the recommended tool. It allows to embed, debug and test the program, in one single amazing tool.
Debug Informations of
the Cross-Compiled Program
Firstly…
OS
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
51
HardwareYour Workstation
Cross-Compiled Program
Cross-GDB
GDB is the recommended tool. It allows to embed, debug and test the program, in one single amazing tool.
Alpha
Debug Informations of
the Cross-Compiled Program
Firstly…
OS
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
51
HardwareYour Workstation
Cross-Compiled Program
Cross-GDB
GDB is the recommended tool. It allows to embed, debug and test the program, in one single amazing tool.
Alpha
Debug Informations of
the Cross-Compiled Program
Firstly…
OS
GDB Debug Protocol
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
51
HardwareYour Workstation
Cross-Compiled Program
Cross-GDB
GDB is the recommended tool. It allows to embed, debug and test the program, in one single amazing tool.
Alpha
Debug Informations of
the Cross-Compiled Program
Firstly…
OS
The program is dynamically debugged, so no more static logs/
prints everywhere in the code
GDB Debug Protocol
Embedded Software Made Easy
Challenge #5 - How do I make embedded development simple?
51
HardwareYour Workstation
Cross-Compiled Program
Cross-GDB
GDB is the recommended tool. It allows to embed, debug and test the program, in one single amazing tool.
Alpha
Debug Informations of
the Cross-Compiled Program
Firstly…
OS
The program is dynamically debugged, so no more static logs/
prints everywhere in the code
But also the entire system, including its
OS, drivers, and other processes.
GDB Debug Protocol
Embedded Software Made Easy 52
Embedded Software Made Easy 52
Embedded Software Made Easy
And finally, how would you find mistakes before they become bugs? Agile development? Test-Driven Development? Continuous Integration?
Dedicate your time and energy to your product using our second tool, Lab, which automates the setup of a target and its interfaces. Useful even on a day-to-day basis for your tedious manual setups of the targets and to be able later on to run automatic tests from a continuous integration server.
Challenge #5 - How do I make embedded development simple?
53
Embedded Software Made Easy 54
Embedded Software Made Easy 54
Embedded Software Made Easy 55
Challenge #6 - How do I go in production?
Hardware
Program in Read-Only Memory
Embedded Software Made Easy 55
Challenge #6 - How do I go in production?
HardwareProduction Test Bench
Program in Read-Only Memory
Any kind of link
Embedded Software Made Easy 55
Challenge #6 - How do I go in production?
HardwareProduction Test Bench
Program in Read-Only Memory
Any kind of link
In the chief hat case, the network controller could be used.
Embedded Software Made Easy 55
Challenge #6 - How do I go in production?
HardwareProduction Test Bench
Program in Read-Only Memory
Any kind of linkAlpha
In the chief hat case, the network controller could be used.
Embedded Software Made Easy 55
Challenge #6 - How do I go in production?
HardwareProduction Test Bench
Program in Read-Only Memory
Any kind of link
Alpha
In the chief hat case, the network controller could be used.
Embedded Software Made Easy 55
Challenge #6 - How do I go in production?
HardwareProduction Test Bench
Program in Read-Only Memory
Any kind of link
Cross-GDBAlpha
In the chief hat case, the network controller could be used.
Embedded Software Made Easy 55
Challenge #6 - How do I go in production?
HardwareProduction Test Bench
Program in Read-Only Memory
Any kind of linkDebug
Informations of Program in Read-
Only Memory
Cross-GDBAlpha
In the chief hat case, the network controller could be used.
Embedded Software Made Easy 56
Hardware test benches are expensive and are a whole project of their own.
We recommend also using Lab to make it as much software as possible:
• Connect your hardware to your test instruments.
• Connect your instruments to Lab and you are down with hardware, you can continue fully software…
Challenge #6 - How do I go in production?
Simplicity is prerequisite of reliability
Edsger W. Dijkstra Computer Science Pioneer
linkedin.com/in/guerrajulio
Embedded Software Made Easy
Have Fun & Good Luck!
github.com/farjump/raspberry-pi
Top Related