Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
GNU/Linux Rapid Embedded Programming

You're reading from  GNU/Linux Rapid Embedded Programming

Product type Book
Published in Mar 2017
Publisher Packt
ISBN-13 9781786461803
Pages 732 pages
Edition 1st Edition
Languages
Author (1):
Rodolfo Giometti Rodolfo Giometti
Profile icon Rodolfo Giometti

Table of Contents (26) Chapters

GNU/Linux Rapid Embedded Programming
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Installing the Developing System Managing the System Console C Compiler, Device Drivers, and Useful Developing Techniques Quick Programming with Scripts and System Daemons Setting Up an Embedded OS General Purposes Input Output signals – GPIO Serial Ports and TTY Devices - TTY Universal Serial Bus - USB Inter-Integrated Circuits - I2C Serial Peripheral Interface - SPI 1-Wire - W1 Ethernet Network Device - ETH Wireless Network Device - WLAN Controller Area Network - CAN Sound Devices - SND Video devices - V4L Analog-to-Digital Converters - ADC Pulse-Width Modulation - PWM 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 €14.99/month. Cancel anytime}