call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
TDC2016SP - Trilha Linux Embarcado
1. COPYRIGHT 2016 – Fundação CERTI
C++ and
Embedded Linux:
a perfect match
Vinicius Zein | Fundação CERTI
2. COPYRIGHT 2016 – Fundação CERTI
https://br.linkedin.com/in/viniciuszein
Vinicius Tadeu Zein
R&D Coordinator @CERTI Foundation
• Responsible for the Embedded Systems team
• More than 10 years developing Embedded Systems
• In companies like Atmel, LG Electronics and CERTI
3. COPYRIGHT 2016 – Fundação CERTI
R&D Institute
Founded in 1984 with the mission to
develop technology solutions for products
and processes
500 employees
Private, but results are reinvested in R&D
MCTI and SUFRAMA accredited – projects
with “Lei de Informática”, “Lei do Bem” and
Embrapii
More than 500 clients around the world
4. COPYRIGHT 2016 – Fundação CERTI
The information in this presentation was compiled from sources believed to be
reliable for informational purposes only.
Content includes opinions, presentations, articles, hyperlinks or other third
party content (“Third Party Material”) that is not intended to, nor constitutes an
endorsement by CERTI of the author or the Third Party Materials. The content
and views within the Third Party Material are solely those of the third party and
do not reflect the opinions of CERTI.
The opinions expressed in this presentation and on the following slides are
solely those of the
presenter and not necessarily those of CERTI. CERTI does not guarantee the
accuracy or
reliability of the information provided herein.
. Disclaimer
5. COPYRIGHT 2016 – Fundação CERTI
SU
MMA
RY
CHAPTER 1
Embedded
Linux
CHAPTER 2
C++
CHAPTER 3
Development
tools and
debugging
CHAPTER 4
Test
frameworks
CHAPTER 5
Test driven
development
CHAPTER 6
Final
considerations
8. COPYRIGHT 2016 – Fundação CERTI
Telephone exchanges
IP Phones and Smartphones
TVs and Set-top boxes
Printers
Electronic Control Units for cars
Cameras
Android systems
CHAPTER 1 | EMBEDDED LINUX
11. COPYRIGHT 2016 – Fundação CERTI
C++ “cee plus plus”
CHAPTER 2 Multi-paradigm
Object oriented
Templates, inline functions
Metaprogramming
High-performative and powerfull
Lots of tools
Compatibility with C - just in case ;)
STL, Boost, ACE
Evolving language
CHAPTER 2 | C++
C++85 style "C with Classes”, C++98, C++03, C++11,
C++14, C++17
12. COPYRIGHT 2016 – Fundação CERTI
Don’t lower
your level of
abstraction
without a good reason!
Low-levelimplies
Morecode
Morebugs
Highermaintenancecosts
13. COPYRIGHT 2016 – Fundação CERTI
Embedded
Linux
C++
Perfect match
CHAPTER 2 | C++
14. COPYRIGHT 2016 – Fundação CERTI
DEVELOPMENT
TOOLS AND
DEBUGGING
CHAPTER 3
15. COPYRIGHT 2016 – Fundação CERTI
CHAPTER 3 | DEVELOPMENT TOOLS AND DEBUGGING
“Making Embedded Linux Easy
Buildroot is a simple, efficient
and easy-to-use tool to generate
embedded Linux systems through
cross-compilation.”
Build systems > Buildroot
16. COPYRIGHT 2016 – Fundação CERTI
CHAPTER 3 | DEVELOPMENT TOOLS AND DEBUGGING
Build systems > Yocto Project
“It's not an embedded
Linux distribution
– it creates a custom
one for you”
17. COPYRIGHT 2016 – Fundação CERTI
CHAPTER 3 | DEVELOPMENT TOOLS AND DEBUGGING
Build systems > Autoconf
Rake
Boost.Build
Qmake
Scons
CMake
18. COPYRIGHT 2016 – Fundação CERTI
CHAPTER 3 | DEVELOPMENT TOOLS AND DEBUGGING
IDEs * Code edition and navigation
Vim
Emacs
Sublime Text 2
Eclipse CDT
Netbeans
SlickEdit
QtCreator
JetBrains AppCode
19. If debugging is the
process of removing bugs,
then programming must
be the process of putting
them in
Edsger Dijkstra
20. COPYRIGHT 2016 – Fundação CERTI
CHAPTER 3 | DEVELOPMENT TOOLS AND DEBUGGING
Debugging
Logs
Command Line Interface (CLI)
gdb (post morten)
gdb + gdbserver
ddd
Google BreakPad
For each
bug found,
a new unit
test.
21. COPYRIGHT 2016 – Fundação CERTI
CAPÍTULO 3 | FERRAMENTAS DESENVOLVIMENTO E DEBUGGING
Debugging > GDB
Post morten
gdb <program> -c <core_file>
bt full -> backtrace
print <variable>
frame <frame_id>
thread <thread_id>
33. COPYRIGHT 2016 – Fundação CERTI
CHAPTER 4 | TEST FRAMEWORKS FOR C++
Unit tests – gtest > Well documented
Multiplatform
Linux, Windows, Mac OS X
Easy to use, easy to configure
1 execution > multiple failures
39. COPYRIGHT 2016 – Fundação CERTI
gmock > Google Mocking Framework for tests
in C++
Real targets are not always available
Simulating behavior
Creating emulators
CHAPTER 4 | TEST FRAMEWORKS FOR C++
52. COPYRIGHT 2016 – Fundação CERTI
CAPÍTULO 6 | Final considerations
RAII
RAII
Resource
Acquisition Is
Initialization
53. COPYRIGHT 2016 – Fundação CERTI
Use a
code standard
h#p://www.chromium.org/developers/coding-style
h#p://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
h#p://clang.llvm.org/docs/ClangFormat.html