SlideShare a Scribd company logo
©
Le logiciel dévore le monde
— Marc Andreessen
• s
Embedded Software
Made Easy
The GNU Debugger
for the benefit of
Embedded Engineering
Embedded Software
Made Easy 2
Embedded Software Engineering
Embedded Software
Made Easy 3
The State of Embedded Engineering
1. Extra
Hardware
Embedded Software
Made Easy 3
The State of Embedded Engineering
1. Extra
Hardware
2. Task-Specific
Setup
Embedded Software
Made Easy 3
The State of Embedded Engineering
1. Extra
Hardware
3. Manual Setup
2. Task-Specific
Setup
Embedded Software
Made Easy 3
The State of Embedded Engineering
1. Extra
Hardware
3. Manual Setup
2. Task-Specific
Setup
4. Task-Specific
Tools &
Environment
The GNU Debugger GDB for the benefit of Embedded Engineering
The GNU Debugger GDB for the benefit of Embedded Engineering
Embedded Software
Made Easy
Unified Embedded Software Engineering
6
MIPS
PowerPC
Filter & Select
the Hardware
1
Embedded Software
Made Easy
Unified Embedded Software Engineering
6
MIPS
PowerPC
Filter & Select
the Hardware
1
Lock the Hardware
2
Embedded Software
Made Easy
Unified Embedded Software Engineering
6
MIPS
PowerPC
Filter & Select
the Hardware
1
Lock the Hardware
2
Interface with the
Hardware Ports
3
Embedded Software
Made Easy
Unified Embedded Software Engineering
6
MIPS
PowerPC
Filter & Select
the Hardware
1
Lock the Hardware
2
Prototype, Program,
Debug or Test
4
Interface with the
Hardware Ports
3
Embedded Software
Made Easy
Unified Embedded Software Engineering
6
MIPS
PowerPC
Filter & Select
the Hardware
1
Lock the Hardware
2
Prototype, Program,
Debug or Test
4
Interface with the
Hardware Ports
3
Unlock the Hardware
5
7
How much time to blink a LED?
https://youtu.be/niSBhjHa22I
Embedded Software
Made Easy 8
Alpha
Embedded System-Level GDB Server
Embedded Software
Made Easy 8
Alpha
Embedded System-Level GDB Server
Embedded Software
Made Easy 8
GDB
Alpha
Embedded System-Level GDB Server
Embedded Software
Made Easy 8
GDB GDB Protocol
Alpha
Embedded System-Level GDB Server
Embedded Software
Made Easy 9
Alpha
Embedded System-Level GDB Server
Baremetal
Software
Hardware
Embedded Software
Made Easy 9
Alpha
Embedded System-Level GDB Server
Software
Hardware
User Space
Kernel Space
OS Drivers
DriversKernel
Services
Applications
Embedded Software
Made Easy10
Maestro
Hardware-as-a-Service
Server
Integrations
Engineers
Legacy Tools Hardware
Systems
USB
Ethernet
Switch
Serial
Embedded Software
Made Easy10
Maestro
Hardware-as-a-Service
Server
Integrations
Engineers
Legacy Tools Hardware
Systems
USB
Ethernet
Switch
Serial
Embedded Software
Made Easy10
Maestro
Hardware-as-a-Service
Shell
Command-Line
Interface
Server
Integrations
Engineers
Legacy Tools Hardware
Systems
USB
Ethernet
Switch
Serial
Embedded Software
Made Easy10
Maestro
Hardware-as-a-Service
Shell
Command-Line
Interface
Programming
Library
{API}
Server
Integrations
Engineers
Legacy Tools Hardware
Systems
USB
Ethernet
Switch
Serial
Embedded Software
Made Easy10
Maestro
Hardware-as-a-Service
Shell
Command-Line
Interface
Programming
Library
{API}
Virtual
Interfaces
Server
Integrations
Engineers
Legacy Tools Hardware
Systems
USB
Ethernet
Switch
Serial
Embedded Software
Made Easy 11
Maestro
Hardware-as-a-Service
Hardware
Targets
Microcontrollers,
SoCs, FPGAs, DSPs,
development
boards, etc.
Embedded Software
Made Easy
Ports
11
Maestro
Hardware-as-a-Service
Maestro Server
Maestro’s configuration file
describing the targets it is
connected to.
Hardware
Targets
Microcontrollers,
SoCs, FPGAs, DSPs,
development
boards, etc.
Ethernet, Serial,
Switch, USB
Embedded Software
Made Easy
PortsTCP
Networking
11
Maestro Clients
• CLI: day-to-day target
management and access;
fast shell scripting.
• API: software integration
of Maestro features into
new or existing software
tools.
Maestro
Hardware-as-a-Service
Maestro Server
Maestro’s configuration file
describing the targets it is
connected to.
Hardware
Targets
Microcontrollers,
SoCs, FPGAs, DSPs,
development
boards, etc.
Ethernet, Serial,
Switch, USB
Embedded Software
Made Easy 12
Targets General-Purpose Server
running Maestro in
server mode
General-Purpose HUBs to connect
the Targets to the Server: USB
HUBs, ethernet switch, relays
Embedded Software
Made Easy
Targets
General-Purpose Server
running Maestro in
server mode
General-Purpose HUBs to connect
the Targets to the Server: USB
HUBs, ethernet switch, relays
Embedded Software
Made Easy 14
Server running Maestro
in server mode
HUBs to connect the
Targets to the Server: USB
HUBs, ethernet switch,
relays
Targets
Embedded Software
Made Easy 15
Demo Time !
© 16
Listing Targets
© 16
DEVICE ID NAME DRIVER BOUNDARY
d49c1819 KMTronic U8CR relay device
41b5177c USB-Serial Converter serial device
5e57e906 USB-Serial Converter serial port
9b2c4cda USB-Serial Converter serial port
a4922b30 USB-Serial Converter serial port
bae537e2 USB-Serial Converter serial port
10e84693 USB-Serial Converter serial port
$ maestro device list
© 17
Server-side Configuration
© 17
[…]
"mpc5567evb-1": {
"ports": {
"ethernet": {
"type": "ethernet",
"ports": {
"ip-1": {
"type": "ip",
"device":
"192.168.255.1",
"ports": {
"alpha": {
"gdb": {
"type":
"udp",
"port": 1234
}
}
}
}
}
},
"serials": {
"alpha": {
"type": "serial",
"device": "41b5177c",
"config": {
"bps": 115200
}
}
},
"switches": {
"power": {
"type": "relay",
"relay": 5,
"device": "d49c1819"
},
"debug": {
"type": "relay",
"relay": 6,
"device": "d49c1819"
}
}
}
}
[…]
$ cat targets.json
© 18
[…]
"mpc5567evb-1": {
[…]
"scenarios": {
"modes": {
"power": {
"states": {
"switches.power": "on"
},
"debug": {
"states": {
"switches.reset": "on",
"switches.debug": "on"
}
}
}
}
}
}
[…]
$ cat targets.json
© 19
[…]
"mpc5567evb-1": {
[…]
"labels": {
"arch": "powerpc",
"cpu": "e200",
"board": "mpc5567evb"
}
}
[…]
$ cat targets.json
© 20
Selecting Targets
© 20
TARGET ID NAME LOCKED COMMENT
c4333646 mpc5567evb-1 false
24d58d09 qemu-powerpc-e500mc false
f52c26de rpi-1 false
9cf2b38a rpi-2 false
03d1ecd9 rpi-3 false
fc5e2193 rpi-4 false
7ecb7faa rpi-5 false
$
$ maestro target list
© 20
TARGET ID NAME LOCKED COMMENT
c4333646 mpc5567evb-1 false
24d58d09 qemu-powerpc-e500mc false
f52c26de rpi-1 false
9cf2b38a rpi-2 false
03d1ecd9 rpi-3 false
fc5e2193 rpi-4 false
7ecb7faa rpi-5 false
$
$ maestro target list
$ maestro target list --label arch=powerpc
TARGET ID NAME LOCKED COMMENT
c4333646 mpc5567evb-1 false
24d58d09 qemu-powerpc-e500mc false
$
© 20
TARGET ID NAME LOCKED COMMENT
c4333646 mpc5567evb-1 false
24d58d09 qemu-powerpc-e500mc false
f52c26de rpi-1 false
9cf2b38a rpi-2 false
03d1ecd9 rpi-3 false
fc5e2193 rpi-4 false
7ecb7faa rpi-5 false
$
$ maestro target list
$ maestro target list --label arch=powerpc
TARGET ID NAME LOCKED COMMENT
c4333646 mpc5567evb-1 false
24d58d09 qemu-powerpc-e500mc false
$$ maestro target list --label arch=powerpc --label cpu=e200
TARGET ID NAME LOCKED COMMENT
c4333646 mpc5567evb-1 false
© 21
Locking a Target
© 21
$ maestro target lock --expiration=12h mpc5567evb-1
mpc5567evb-1
$
© 21
$ maestro target lock --expiration=12h mpc5567evb-1
mpc5567evb-1
$
[
{
"id": "c4333646",
"name": "mpc5567evb-1",
"lock": {
"timestamp": "2017-12-18T14:48:40.579543034Z",
"expiration": 43200000000000,
"user": {
"id": "julio"
}
},
"configuration": {
[…]
}
}
]
$ maestro target inspect mpc5567evb-1
© 22
Waiting for a Target
© 22
mpc5567evb-1
$
$ maestro target lock --expiration=12h mpc5567evb-1
© 22
mpc5567evb-1
$$ maestro target lock mpc5567evb-1
Couldn’t lock the target mpc5567evb-1
$
$ maestro target lock --expiration=12h mpc5567evb-1
© 22
mpc5567evb-1
$$ maestro target lock mpc5567evb-1
Couldn’t lock the target mpc5567evb-1
$
12 hours later
mpc5567evb-1
$ maestro target lock mpc5567evb-1 --wait=13h
$ maestro target lock --expiration=12h mpc5567evb-1
© 23
Managing Target Modes
© 23
MODE STATE
.
!"" power OFF
!"" debug INHERITED
$
$ maestro target mode get -r mpc5567evb-1
© 23
MODE STATE
.
!"" power OFF
!"" debug INHERITED
$
$ maestro target mode get -r mpc5567evb-1
MODE STATE
.
!"" power ON
!"" debug ON
$
$ maestro target mode set -r mpc5567evb-1 debug on
© 23
MODE STATE
.
!"" power OFF
!"" debug INHERITED
$
$ maestro target mode get -r mpc5567evb-1
MODE STATE
.
!"" power ON
!"" debug ON
$
$ maestro target mode set -r mpc5567evb-1 debug on
MODE STATE
.
!"" power ON
!"" debug OFF
$ maestro target mode set -r mpc5567evb-1 debug off
© 24
Listing Target Ports
© 24
PORT TYPE
#"" serials
$ !"" alpha serial
#"" switches
$ #"" reset switch
$ #"" power switch
$ !"" debug switch
!"" ethernet ethernet
!"" ip-1 ip
!"" alpha
!"" gdb udp
$
$ maestro target port list mpc5567evb-1
© 24
PORT TYPE
#"" serials
$ !"" alpha serial
#"" switches
$ #"" reset switch
$ #"" power switch
$ !"" debug switch
!"" ethernet ethernet
!"" ip-1 ip
!"" alpha
!"" gdb udp
$
$ maestro target port list mpc5567evb-1
$ maestro target port list mpc5567evb-1 --label fj.alpha.debug
PORT TYPE
!"" ethernet ethernet
!"" ip-1 ip
!"" alpha
!"" gdb udp
$
© 24
PORT TYPE
#"" serials
$ !"" alpha serial
#"" switches
$ #"" reset switch
$ #"" power switch
$ !"" debug switch
!"" ethernet ethernet
!"" ip-1 ip
!"" alpha
!"" gdb udp
$
$ maestro target port list mpc5567evb-1
$ maestro target port list mpc5567evb-1 --label fj.alpha.debug
PORT TYPE
!"" ethernet ethernet
!"" ip-1 ip
!"" alpha
!"" gdb udp
$$ maestro target port list mpc5567evb-1 --label fj.alpha.console
PORT TYPE
!"" serials
!"" alpha serial
© 25
Driving Target Ports
© 25
Usage: maestro target port drive mpc5567evb-1 serials.alpha [command]
Available Commands:
attach Attach local standard intput and output streams to a serial device
read Read data from a serial device.
virtual Create a virtual serial device
write Write data to a serial device.
Flags:
--bps=uint Serial line baudrate in bytes per second.
--min=uint Minimum read size. Block until this amount of bytes is received.
(defaults to "1")
$
$ maestro target port drive mpc5567evb-1 serials.alpha --help
© 25
Usage: maestro target port drive mpc5567evb-1 serials.alpha [command]
Available Commands:
attach Attach local standard intput and output streams to a serial device
read Read data from a serial device.
virtual Create a virtual serial device
write Write data to a serial device.
Flags:
--bps=uint Serial line baudrate in bytes per second.
--min=uint Minimum read size. Block until this amount of bytes is received.
(defaults to "1")
$
$ maestro target port drive mpc5567evb-1 serials.alpha --help
12 bytes written in 176.031µs
$ echo 'hello world' | maestro target port drive mpc5567evb-1 serials.alpha write
© 26
Creating Virtual Target Ports

of their remote physical counterparts
© 26
/dev/pts/23
$
$ maestro target port drive mpc5567evb-1 serials.alpha virtual
© 26
/dev/pts/23
$
$ maestro target port drive mpc5567evb-1 serials.alpha virtual
udp://127.0.0.1:43840
$ maestro target port drive mpc5567evb-1 ethernet.ip-1.alpha.gdb virtual
27
Hello, GDB!

https://youtu.be/TYnD03A8cZM
28
GDB Scripting Example
Embedded Program’s Execution Benchmark

https://youtu.be/iFvImG3TzFc
29
GDB Scripting Example
Embedded Program’s Awareness

https://youtu.be/LJ88V5lfcsM
30
Semihosting
Host/Target Communication

https://youtu.be/9I7oOMmzuVo
31
Porting Test Frameworks

https://youtu.be/uzIuUaknSDg
32
Continuous Integration

https://youtu.be/77IdADA9J3U
33
Embedded Software
Made Easy
github.com/farjump/raspberry-pi
Start Now!

More Related Content

PDF
Stack Smashing Protector (Paul Rascagneres)
PDF
DEF CON 27- SHEILA A BERTA - backdooring hardware devices by injecting malici...
PPS
Iuwne10 S06 L03
TXT
Dx diag
PPS
Iuwne10 S06 L01
PDF
Android Things in action
PDF
Ieee 1149.1-2013-tutorial-ijtag
PDF
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
Stack Smashing Protector (Paul Rascagneres)
DEF CON 27- SHEILA A BERTA - backdooring hardware devices by injecting malici...
Iuwne10 S06 L03
Dx diag
Iuwne10 S06 L01
Android Things in action
Ieee 1149.1-2013-tutorial-ijtag
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)

What's hot (20)

PDF
DWX2015 Code Generierung
PDF
Crash_Report_Mechanism_In_Tizen
TXT
PDF
HackLU 2018 Make ARM Shellcode Great Again
PDF
Presentation fpgakit
DOC
Configure Switch Nortel 8600
TXT
Dx diag
PDF
Make ARM Shellcode Great Again
ODP
Watching And Manipulating Your Network Traffic
PDF
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
PDF
SiliconFailsafeForIoT_Doin
PDF
LA Micro stock report 9.9.13
PDF
LA Micro Stock Report 30th October 2013
PDF
LA Micro Stock Report 26th February 2014
PDF
Getting Started With Raspberry Pi - UCSD 2013
PDF
DEF CON 27 - GRICHTER - reverse engineering 4g hotspots for fun bugs net fina...
PDF
LA Micro Stock Report 20th February 2014
PDF
LA Micro Stock Report 7th October 2013
PDF
Evaluation of OpenFlow in RB750GL
DWX2015 Code Generierung
Crash_Report_Mechanism_In_Tizen
HackLU 2018 Make ARM Shellcode Great Again
Presentation fpgakit
Configure Switch Nortel 8600
Dx diag
Make ARM Shellcode Great Again
Watching And Manipulating Your Network Traffic
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
SiliconFailsafeForIoT_Doin
LA Micro stock report 9.9.13
LA Micro Stock Report 30th October 2013
LA Micro Stock Report 26th February 2014
Getting Started With Raspberry Pi - UCSD 2013
DEF CON 27 - GRICHTER - reverse engineering 4g hotspots for fun bugs net fina...
LA Micro Stock Report 20th February 2014
LA Micro Stock Report 7th October 2013
Evaluation of OpenFlow in RB750GL
Ad

Similar to The GNU Debugger GDB for the benefit of Embedded Engineering (20)

PDF
TDC2016SP - Trilha Linux Embarcado
PPTX
Intel Edison: Beyond the Breadboard
PDF
Basics of Embedded System
PDF
All Arduino boards contain a microcontroller, which is a small computer. It t...
PPTX
Embedded Systems Overview
PPT
Embedded System Introduction and microcontroller.ppt
PDF
JS Fest 2018. Володимир Шиманський. Запуск двіжка JS на мікроконтролері
PDF
Presentacion_p1.pdf
PDF
An In-Depth Look Into Microcontrollers
 
PDF
Explorando Go em Ambiente Embarcado
PDF
Software virtualization lessons for extreme IoT portability and scale
PDF
Arduino 101
PDF
Userspace drivers-2016
PDF
Programming Embedded Systems With C And Gnu Development Tools 2nd Edition 2nd...
PDF
IoT: Internet of Things with Python
PDF
Atmega tutorial
PDF
Unit III ARM Interface and ARM Programming
PDF
Hardware Open Source
PPT
Embedded systems
TDC2016SP - Trilha Linux Embarcado
Intel Edison: Beyond the Breadboard
Basics of Embedded System
All Arduino boards contain a microcontroller, which is a small computer. It t...
Embedded Systems Overview
Embedded System Introduction and microcontroller.ppt
JS Fest 2018. Володимир Шиманський. Запуск двіжка JS на мікроконтролері
Presentacion_p1.pdf
An In-Depth Look Into Microcontrollers
 
Explorando Go em Ambiente Embarcado
Software virtualization lessons for extreme IoT portability and scale
Arduino 101
Userspace drivers-2016
Programming Embedded Systems With C And Gnu Development Tools 2nd Edition 2nd...
IoT: Internet of Things with Python
Atmega tutorial
Unit III ARM Interface and ARM Programming
Hardware Open Source
Embedded systems
Ad

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
A Presentation on Artificial Intelligence
PDF
Empathic Computing: Creating Shared Understanding
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation theory and applications.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A comparative analysis of optical character recognition models for extracting...
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
A Presentation on Artificial Intelligence
Empathic Computing: Creating Shared Understanding
“AI and Expert System Decision Support & Business Intelligence Systems”
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
Encapsulation theory and applications.pdf
Electronic commerce courselecture one. Pdf
Spectroscopy.pptx food analysis technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Network Security Unit 5.pdf for BCA BBA.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

The GNU Debugger GDB for the benefit of Embedded Engineering