Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Hands-On Embedded Programming with C++17
Hands-On Embedded Programming with C++17

Hands-On Embedded Programming with C++17: Create versatile and robust embedded solutions for MCUs and RTOSes with modern C++

eBook
$24.99 $35.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Embedded Programming with C++17

What Are Embedded Systems?

Essentially , the embedded part of an embedded system refers to the state of being embedded into a larger system. The system that has been embedded is a computer system of some description, which has one or more very specific functions in the overall system, rather than being a general-purpose component. This larger system can be digital, mechanical, or analog in nature, while the additional integrated digital circuitry tightly interacts with data from and to interfaces, sensors and memory to implement the actual system functionality.

In this chapter, we will look at the following topics:

  • Different categories of embedded platforms
  • Examples of each category
  • Development challenges of each category

The many faces of embedded systems

Every computerized function in today's devices is implemented using one or multiple microprocessors, meaning a computer processor (central processing unit, or CPU) usually contained in a single integrated circuit (IC). The microprocessor comprises at least the arithmetic logic unit (ALU) and control circuitry, but logically also registers, and input/output (I/O) banks, in addition to more advanced features commonly tailored to a specific product category (wearables, low power sensors, mixed signal, ...) or market (consumer, medical, automotive, ...).

At this point in history, almost all microprocessors are found in embedded systems. Even though people are likely to possess a computer, laptop, and smartphone, maybe even a tablet, the number of embedded microprocessors in a given household far dwarfs the number of general-purpose microprocessors...

Microcontrollers

One of the driving factors of innovation in the field of embedded systems is cost, since they will often be high-volume, cheap consumer products. To that end, it helps to have the entire microprocessor, memory, storage, and input/output peripherals on a single chip, simplifying implementation effort, reducing PCB real estate, all with the added benefit of faster and simpler design and production with higher yield. This led to the development of microcontrollers (MCUs) during the 1970s: single-chip computer systems that could be added to a new design for a minimal cost.

With the introduction of Electrically Erasable Programmable Read-Only Memory (EEPROM) to MCUs in the early 1990s, it first became possible to rewrite the program memory of MCUs repeatedly without having to resort to erasing memory content using ultraviolet light through a special quartz window in...

System-on-Chip/Single Board Computer

Systems-on-Chips (SoCs) are similar to MCUs, but distinguish themselves from those types of embedded systems by having some level of integration while still requiring a number of external components to function. They are commonly found as part of a single board implementation (Single Board Computer (SBC)), including the PC/104 standard, and more recently form factors such as the Raspberry Pi and derivative boards:

This diagram was used from https://xdevs.com/article/rpi3_oc/. It clearly shows how an SBC (in this case, the Raspberry Pi 3) is laid out. The BCM2837 is the ARM-based SoC, providing the CPU core and basic peripherals (mostly broken out into the header section). All of the RAM is in an external module, as are the Ethernet and Wi-Fi peripherals. ROM is provided in the form of an SD (Flash) card, which also provides storage.

Most SoCs...

Summary

In this chapter, we got an in-depth look at what constitutes an embedded system. We learned how to distinguish between the various types of embedded systems, as well as how to determine the basics of picking the right MCU or SoC for a project.

After this chapter, the reader should feel comfortable reading through datasheets for MCUs and SoCs, explaining the differences between both, and determining what is needed for a given project.

The next chapter will look at why C++ is a highly suitable choice for the programming of embedded systems.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Know how C++ works and compares to other languages used for embedded development
  • Create advanced GUIs for embedded devices to design an attractive and functional UI
  • Integrate proven strategies into your design for optimum hardware performance

Description

C++ is a great choice for embedded development, most notably, because it does not add any bloat, extends maintainability, and offers many advantages over different programming languages. Hands-On Embedded Programming with C++17 will show you how C++ can be used to build robust and concurrent systems that leverage the available hardware resources. Starting with a primer on embedded programming and the latest features of C++17, the book takes you through various facets of good programming. You’ll learn how to use the concurrency, memory management, and functional programming features of C++ to build embedded systems. You will understand how to integrate your systems with external peripherals and efficient ways of working with drivers. This book will also guide you in testing and optimizing code for better performance and implementing useful design patterns. As an additional benefit, you will see how to work with Qt, the popular GUI library used for building embedded systems. By the end of the book, you will have gained the confidence to use C++ for embedded programming.

Who is this book for?

If you want to start developing effective embedded programs in C++, then this book is for you. Good knowledge of C++ language constructs is required to understand the topics covered in the book. No knowledge of embedded systems is assumed.

What you will learn

  • Choose the correct type of embedded platform to use for a project
  • Develop drivers for OS-based embedded systems
  • Use concurrency and memory management with various microcontroller units (MCUs)
  • Debug and test cross-platform code with Linux
  • Implement an infotainment system using a Linux-based single board computer
  • Extend an existing embedded system with a Qt-based GUI
  • Communicate with the FPGA side of a hybrid FPGA/SoC system

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 31, 2019
Length: 458 pages
Edition : 1st
Language : English
ISBN-13 : 9781788834322
Vendor :
Qt
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Jan 31, 2019
Length: 458 pages
Edition : 1st
Language : English
ISBN-13 : 9781788834322
Vendor :
Qt
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 152.97
Hands-On System Programming with C++
$54.99
Embedded Systems Architecture
$48.99
Hands-On Embedded Programming with C++17
$48.99
Total $ 152.97 Stars icon

Table of Contents

16 Chapters
Section 1: The Fundamentals - Embedded programming and the role of C++ Chevron down icon Chevron up icon
What Are Embedded Systems? Chevron down icon Chevron up icon
C++ as an Embedded Language Chevron down icon Chevron up icon
Developing for Embedded Linux and Similar Systems Chevron down icon Chevron up icon
Resource-Restricted Embedded Systems Chevron down icon Chevron up icon
Example - Soil Humidity Monitor with Wi-Fi Chevron down icon Chevron up icon
Section 2: Testing, Monitoring Chevron down icon Chevron up icon
Testing OS-Based Applications Chevron down icon Chevron up icon
Testing Resource-Restricted Platforms Chevron down icon Chevron up icon
Example - Linux-Based Infotainment System Chevron down icon Chevron up icon
Example - Building Monitoring and Control Chevron down icon Chevron up icon
Section 3: Integration with other tools and frameworks Chevron down icon Chevron up icon
Developing Embedded Systems with Qt Chevron down icon Chevron up icon
Developing for Hybrid SoC/FPGA Systems Chevron down icon Chevron up icon
Best Practices Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.5
(6 Ratings)
5 star 33.3%
4 star 0%
3 star 0%
2 star 16.7%
1 star 50%
Filter icon Filter
Top Reviews

Filter reviews by




Druilhe Jean-Louis Feb 08, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
livre synthétique permettant de retrouver l'essentiel sur des questionnements comme le polymorphisme appliqué à l'embedded.
Feefo Verified review Feefo
Debasish Aug 14, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good
Amazon Verified review Amazon
Dario Guapaman Nov 27, 2020
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Edizione kindle: compaiono dei tag (<indexentry ...>), probabili errori di formattazione.Il titolo fa credere che ci siano peculiarità C++17, ma in realtà c'è ben poco di C++17: tanto valeva dire genericamente "modern C++" o solo "C++" e specificare nel testo quale standard deve supportare un compilatore per compilare il codice: per quel che ho visto fino ad ora — 71% del libro — C++11 basta. Ho trovato pure degli errori fastidiosi nel codice, banalità che indicano scarsa cura: uint8_t x in una riga, che è corretto, ma nelle successiva scrive uint8 (senza _t)… nemmeno si compilerebbe, a meno di non avere un typedef (o meglio, using) opportuno da qualche parte, ma non avrebbe senso mescolare le due cose. Incuria nel codice che si suppone debba funzionare è molto fastidiosa.Il libro ha dei meriti, ma rispetto alle aspettative create dal titolo è deludente.
Amazon Verified review Amazon
Mindaugas Milasauskas May 22, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Book is good. Buy it from somewhere else. Don't waste your time on Amazon due to serious packing quality issues.
Amazon Verified review Amazon
Scotty Winsome Oct 09, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I am 20 years embedded programming for a living with C, ready to expand to C++, while this book celebrates embedded programming with C++, it does not give concrete examples of migrating from C to C++ nor any significant advice or strategy for using C++ for embedded. The examples are so pallid. Sorry.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.