Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
GNU/Linux Rapid Embedded Programming
GNU/Linux Rapid Embedded Programming

GNU/Linux Rapid Embedded Programming: Your one-stop solution to embedded programming on GNU/Linux

Arrow left icon
Profile Icon Rodolfo Giometti
Arrow right icon
Mex$737.99 Mex$820.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (3 Ratings)
eBook Mar 2017 732 pages 1st Edition
eBook
Mex$737.99 Mex$820.99
Paperback
Mex$1025.99
Subscription
Free Trial
Arrow left icon
Profile Icon Rodolfo Giometti
Arrow right icon
Mex$737.99 Mex$820.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (3 Ratings)
eBook Mar 2017 732 pages 1st Edition
eBook
Mex$737.99 Mex$820.99
Paperback
Mex$1025.99
Subscription
Free Trial
eBook
Mex$737.99 Mex$820.99
Paperback
Mex$1025.99
Subscription
Free Trial

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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

GNU/Linux Rapid Embedded Programming

Chapter 2. Managing the System Console

In the first chapter of this book, we saw how to set up our developer kits and (in part) the host PC. We already got a first login via the serial console by showing you how you can connect a serial (or USB-to-Serial) adapter to each kit; however, in this chapter, we're going to go further into exploring the serial console and the shell running in it.

In this section, you will learn some useful command-line tools to manipulate files and also learn how to manage the distribution's packages. These commands will be used into this book, and even if you may already know them, it's useful to briefly review them.

In the end, a special section will introduce the bootloader commands (U-Boot in our cases) so you may feel more confident in managing this important component of the system. In fact, the serial console is mostly used to set up the running system (that is, the running distribution), but it is used to set up the booting stages...

Basic OS management

Now it's time to take a quick tour of some basic system management commands, which may be useful in the next sections.

You should notice that the following commands can be used indifferently into each developer kit presented in this book as is in the host PC as is in any other GNU/Linux-based OS! This is a really important feature of GNU/Linux systems that allows a developer to have the same command set into its working machine as the one in the embedded devices.

For the sake of simplicity, the following examples are executed into the host PC.

File manipulation and Co

One of the main principles of Unix systems is that everything is a file. This means that in a Unix system, (almost) everything can be accessed as a file! So we can use the same commands to read/write a file for every peripheral connected to the system (that is, disks, terminals, serial ports, and so on).

Since this book's main goal is to show you how to get access to the system's peripherals...

A quick tour into the bootloader

As stated at the beginning of this chapter, using the serial console, we can get access to the bootloader.

Actually, all the developer kits presented in this book have two bootloaders: a pre-bootloader or Secondary Program Loader (SPL), named MLO for the BeagleBone Black, boot.bin for SAMA5D3 Xplained, and SPL for the Wandboard, which initializes the hardware components, such as the RAM and some mass storage devices, and bootloader named U-Boot for all boards, which is the real bootloader that initializes almost all the peripherals and has support for, among other things, booting over network and a scriptable shell through which basic commands can be given. Now the one million dollar question is: why should a developer be able to manage the bootloader too?

Well the answers are more than one; however, the most important ones are:

  • By passing a well-formed command line to the kernel, we can change some functionalities in the running filesystem.
  • From the bootloader...

Summary

In this chapter, we took a first look at our newly embedded developer kits. We saw several useful command-line tools that will be used throughout this book, and then we took a long tour into the bootloader, discovering several useful commands to manage some hardware and/or onboard storage devices.

In the next chapter, we will look more closely look into the kernel, its mechanisms, and its recompilation with a deep look into the C compiler usage using both its native form as well as the cross-compiler one.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Rapidly design and build powerful prototypes for GNU/Linux Embedded systems
  • Become familiar with the workings of GNU/Linux Embedded systems and how to manage its peripherals
  • Write, monitor, and configure applications quickly and effectively, manage an external micro-controller, and use it as co-processor for real-time tasks

Description

Embedded computers have become very complex in the last few years and developers need to easily manage them by focusing on how to solve a problem without wasting time in finding supported peripherals or learning how to manage them. The main challenge with experienced embedded programmers and engineers is really how long it takes to turn an idea into reality, and we show you exactly how to do it. This book shows how to interact with external environments through specific peripherals used in the industry. We will use the latest Linux kernel release 4.4.x and Debian/Ubuntu distributions (with embedded distributions like OpenWrt and Yocto). The book will present popular boards in the industry that are user-friendly to base the rest of the projects on - BeagleBone Black, SAMA5D3 Xplained, Wandboard and system-on-chip manufacturers. Readers will be able to take their first steps in programming the embedded platforms, using C, Bash, and Python/PHP languages in order to get access to the external peripherals. More about using and programming device driver and accessing the peripherals will be covered to lay a strong foundation. The readers will learn how to read/write data from/to the external environment by using both C programs or a scripting language (Bash/PHP/Python) and how to configure a device driver for a specific hardware. After finishing this book, the readers will be able to gain a good knowledge level and understanding of writing, configuring, and managing drivers, controlling and monitoring applications with the help of efficient/quick programming and will be able to apply these skills into real-world projects.

Who is this book for?

This book targets Embedded System developers and GNU/Linux programmers who would like to program Embedded Systems and perform Embedded development. The book focuses on quick and efficient prototype building. Some experience with hardware and Embedded Systems is assumed, as is having done some previous work on GNU/Linux systems. Knowledge of scripting on GNU/Linux is expected as well.

What you will learn

  • Use embedded systems to implement your projects
  • Access and manage peripherals for embedded systems
  • Program embedded systems using languages such as C, Python, Bash, and PHP
  • Use a complete distribution, such as Debian or Ubuntu, or an embedded one, such as OpenWrt or Yocto
  • Harness device driver capabilities to optimize device communications
  • Access data through several kinds of devices such as GPIO's, serial ports, PWM, ADC, Ethernet, WiFi, audio, video, I2C, SPI, One Wire, USB and CAN

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 29, 2017
Length: 732 pages
Edition : 1st
Language : English
ISBN-13 : 9781786463289
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 29, 2017
Length: 732 pages
Edition : 1st
Language : English
ISBN-13 : 9781786463289
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 Mex$85 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 Mex$85 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Mex$ 3,897.97
Mastering Embedded Linux Programming
Mex$1435.99
Linux Device Drivers Development
Mex$1435.99
GNU/Linux Rapid Embedded Programming
Mex$1025.99
Total Mex$ 3,897.97 Stars icon

Table of Contents

19 Chapters
1. Installing the Developing System Chevron down icon Chevron up icon
2. Managing the System Console Chevron down icon Chevron up icon
3. C Compiler, Device Drivers, and Useful Developing Techniques Chevron down icon Chevron up icon
4. Quick Programming with Scripts and System Daemons Chevron down icon Chevron up icon
5. Setting Up an Embedded OS Chevron down icon Chevron up icon
6. General Purposes Input Output signals – GPIO Chevron down icon Chevron up icon
7. Serial Ports and TTY Devices - TTY Chevron down icon Chevron up icon
8. Universal Serial Bus - USB Chevron down icon Chevron up icon
9. Inter-Integrated Circuits - I2C Chevron down icon Chevron up icon
10. Serial Peripheral Interface - SPI Chevron down icon Chevron up icon
11. 1-Wire - W1 Chevron down icon Chevron up icon
12. Ethernet Network Device - ETH Chevron down icon Chevron up icon
13. Wireless Network Device - WLAN Chevron down icon Chevron up icon
14. Controller Area Network - CAN Chevron down icon Chevron up icon
15. Sound Devices - SND Chevron down icon Chevron up icon
16. Video devices - V4L Chevron down icon Chevron up icon
17. Analog-to-Digital Converters - ADC Chevron down icon Chevron up icon
18. Pulse-Width Modulation - PWM Chevron down icon Chevron up icon
19. Miscellaneous Devices Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(3 Ratings)
5 star 66.7%
4 star 0%
3 star 33.3%
2 star 0%
1 star 0%
Eternauta Jan 18, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Il libro contiene molti contenuti è copre molti aspetti della programmazione di sistemi embedded con GNU/Linux. Gli esempi sono riferiti alle schede di riferimento BeagleBoard, WandaBoard e Atmel Xplained.
Amazon Verified review Amazon
Michele Apuzzo May 13, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book! Suggested for all the people who need to deeply understand how to use linux in an embedded system
Amazon Verified review Amazon
aciokkan Apr 01, 2019
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Interesting book. So far, I've only managed to go through the first 100 pages and preface. The grammar is poor, and it's supposed to have been checked by PAKT before printing. This makes it very difficult to follow the intention. Connecting to the BeagleBone and configuring the system are done in a haste without explaining what and where the commands are meant to be run. The "minicom" section is poor. No minimum of explanation of what to expect of it, or reasoning. I ended up using "screen" to connect to the BeagleBone. It is written by a developer/engineer...you can see that the author is all over the place and it's brilliant, but not coherent. Will come back with 2 later edits. Once half way, and when finished.
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.