Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
GNU/Linux Rapid Embedded Programming

You're reading from   GNU/Linux Rapid Embedded Programming Your one-stop solution to embedded programming on GNU/Linux

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781786461803
Length 732 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rodolfo Giometti Rodolfo Giometti
Author Profile Icon Rodolfo Giometti
Rodolfo Giometti
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

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

Embedded world terms

Before putting our hands on our new boards, it is recommended that you acquaint yourselves with some terms that a user should know in order to avoid misunderstandings. People who have already worked with some GNU/Linux and/or embedded systems may skip this part. The developer kits shown here are tiny single-board computers that can be embedded into a device, so the user should be familiar with some terms used in the wonderful world of embedded programming:

Term

Description

Target

The target system is the embedded computer that we wish to manage.

Usually, it is an ARM platform, but this is not a fixed rule. In fact, PowerPC and MIPS are other (less) common platforms. Even the x86 platform (a standard PC) can be an embedded computer.

Host

The host system is the computer we will use to manage the target system. Usually, it is a normal PC (x86 platform or MAC), but even other platforms can be used (for example, years ago, I used a PowerPC-based computer as a host PC).

Normally, the host system is more powerful than the target one since it's usually used for heavy compiling tasks that the target cannot perform at all or for tasks that it takes a long time to perform.

Serial console

This is the most important communication port in an embedded system.

Using the serial console, the user has complete control of the system.

It's not only indispensable for debugging, but is also the last resort if, by chance, the operating system files are messed up and the board refuses to boot.

Without the serial console, the user can still control the system (if correctly set up), but for the developer/debugger, it's a must-have!

Compiler (or native compiler)

The native compiler is just a compiler! This is the compiler running on a machine (host or target) that builds the code for the current machine (that is, the compiler running on a PC builds the code for the PC, like the one running on an ARM machine builds the code for ARM itself).

Cross-compiler

Strictly speaking, the cross-compiler is just a compiler that builds the code for a foreign platform (that is, a cross-compiler can run on a PC in order to generate binaries for an ARM platform). However, usually, by using this term, the embedded developers also mean the complete compilation suite, that is, the compiler, linker, binutils, libc, and so on.

Toolchain

A toolchain is a set of programming tools that is used to create a software product, that is, another computer program or a set of related programs.

The term toolchain is due the fact that the tools forming a toolchain are executed consecutively as in a chain, so the output of each tool becomes the input for the next one. However, this is not a fixed rule. In fact, the tools in a toolchain are not necessarily executed consecutively.

A simple software development toolchain may consist of a compiler, a linker (plus other binutils), one or more libraries (which provide interfaces to the operating system), and a debugger (used to debug programs).

Distribution

A distribution (or Linux distribution, often called distro for short) is an operating system made from a software collection based on Linux (the kernel) and several software packages (most from the GNU project or based on a Libre Software license) managed by a package management system.

There are several distributions, and they are available for a wide variety of systems ranging from embedded devices (OpenWrt or Yocto) and personal computers to powerful supercomputers.

Root filesystem

The root filesystem (or rootfs) is the filesystem contained on the same partition on which the root directory is located.

This is the most important filesystem in an UNIX system, and it's the first one to be mounted by the kernel. All the other filesystems are mounted on it.

System on chip

A system on chip (SoC) is an integrated circuit that integrates a CPU and different kinds of peripherals (SATA and SD/MMC controller, GPIOs, I2C/SPI/W1 controllers, ADC/DAC converters, audio/video signals, and Ethernet or UART ports) into a single chip.

These chips are widely used in embedded systems where they found their typical application.

Microcontroller

A microcontroller (MCU) is a small computer on a single integrated circuit (like a SoC) that contains a processor core, memory, and programmable IO peripherals. So, the main difference between a SoC is that it has the flash memory (where the program is stored) as well as a small amount of RAM (to execute the program) included on its chip.

Microcontrollers are designed for embedded applications where the tasks to be accomplished are not too complex. They are also used when we need have time constraints or just because they are cost effective.

Flash memory

Flash memory is an electronic non-volatile computer storage medium that can be electrically erased and reprogrammed.

In contrast to a normal PC, this kind of memory is widely used on embedded applications as mass storage due the fact it has no moving parts and it has better resistance to a hostile environment.

Now that some important terms have been pointed out, we are ready to step into the next section and discover our developer kits!

You have been reading a chapter from
GNU/Linux Rapid Embedded Programming
Published in: Mar 2017
Publisher: Packt
ISBN-13: 9781786461803
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image