What this book covers
This book can be divided into two major parts: the first one, which is introductory to the second one, where you will see how to install the developing systems and the host system and how to get access to the serial console. You'll take a look at some basic bootloader's commands as far as to the C compiler and the cross-compiler and then I'll introduce kernel modules, device drivers and some filesystem internals with a note on the Network File System. Also the machine emulator usage will be presented in order to execute a complete target machine's Debian distribution on a host PC, you'll see the system daemons and script programming in Bash, PHP and Python and then you'll take a look at the flash memories and Linux's Memory Technology Device (MTD) where I'll introduce the JFFS2 and the UBIFS filesystem and two of the most famous embedded distribution used in these days, Yocto and OpenWrt.
Below is a brief introduction of each chapters related to this first part:
Chapter 1 , Installing the Developing System, will present three of the most used development kits for industrial applications: the BeagleBone Black, the SAMA5D3 Xplained and the WandBoard. After a brief introduction of each boards, we'll see how we can set up them in order to run a complete GNU/Linux distribution. We'll see how to install a complete developing system on each board as far as the host system (even on a virtual machine).
Chapter 2 , Managing the System Console, will show to setup our developer kits and (in part) the host PC, then we'll go further in exploring the serial console and the shell running in it. In the end a special section will introduce the bootloader commands.
Chapter 3 , C Compiler, Device Drivers, and Useful Developing Techniques, will focus the readers' attention to the C compiler (with its counter part: the cross-compiler). Then we'll take a look at kernel modules, device drivers and some filesystem internals with a note on the Network File System. In the end we'll see how developers can use an emulator in order to execute a complete target machine's Debian distribution on a host PC.
Chapter 4 , Quick Programming with scripts and system daemons, will take a look at system daemons (what they are and how to use the most famous and useful ones). Then we'll take a look at script programming by using Bash, PHP and Python languages.
Chapter 5 , Setting up an embedded OS, will start taking a look at flash memories and the software used to manage them, then we'll present the Linux's Memory Technology Device (MTD) and the two major filesystems that can run over them, that is the JFFS2 and the UBIFS. The we'll present two of the most famous embedded distribution used in these days, Yocto and OpenWrt, and how an embedded developer can write an his/her own application and how he/she can add it to them.
The second part then starts in going deeper in presenting all of such peripheral devices that you, as embedded developer, may encounter into your professional life. For each peripheral I'll present where it is available on each embedded kit supported by this book and then how you can get access and use it. For each device kind I'll show to you how you can easily manage it with practical examples.
Below is a brief introduction of each chapters related to the second part:
Chapter 6 , General Purposes Input Output signals - GPIO, will introduce GPIO lines with a short description and then we'll see where they are physically located in our embedded machines. Then we're going to see in detail how we can get access to these lines in a very simple (but poor efficient) manner and then in a smarter (but a bit more complex) way. In the end we'll cover a rapid introduction of the GPIOs management inside the kernel with IRQ management and LED devices support.
Chapter 7 , Serial Ports and TTY Devices - TTY, will introduce serial ports, that is one of the most important peripherals class a computer can have (at least a computer used in the control automation industry). After a brief description about what a serial port or a serial device is, we'll see how we can manage them into a GNU/Linux system in order to use a real serial device. Then we'll take a look at a kernel trick useful to communicate between two embedded systems by using a serial line as they were connected by an Ethernet cable.
Chapter 8 , Universal Serial Bus - USB, will introduce the USB bus, that is a versatile bus, widely used in modern PCs, that allow people to connect an electronic device to a computer: for instance an hard disk, a keyboard or a serial device can be all connected to a computer through the same USB port.
Chapter 9 , Inter-Integrated Circuits - I2C, will introduce the I2C bus which is typically used to connect on-board devices, that is the main computer with devices whose are all placed on the same board. Several devices use the I2C bus to communicate with the CPU and in this chapter will give to you a panoramic as wide as possible of them: we'll see several kinds of different devices with different configurations in order to cover as much as possible the combinations offered by this bus.
Chapter 10 , Serial Peripheral Interface - SPI, will introduce the SPI bus which is another bus kind typically used to connect on-board devices as I2C does. However, and opposed to the I2C bus, this bus can transfer data at higher rates than I2C and, since it's full-duplex, data transfer can take place bidirectionally at the same time. Due these features the SPI bus is normally used to implement an efficient data stream for multimedia applications or digital signal processing and/or telecommunications devices and SD cards.
Chapter 11, 1-Wire - W1, will introduce Ethernet devices whose add the possibility to any equipped device to communicate with other devices even on very long distances. The GNU/Linux based systems offer a really good support of Ethernet devices and their relative networking protocols that's why most of networking devices around the world are based on this technology.
Chapter 12, Ethernet network device - ETH, will introduce the one wire bus which is interesting because it permits to communicate with a remote device using only one wire even if at slower rates. This allows to simplify connections between the CPU and its peripherals giving the designer the possibility to have the most economical and simply way to add electronic devices for identification, authentication and delivery of calibration data or manufacturing information to a computer board.
Chapter 13 , Wireless Network Device - WLAN, will introduce Wireless network devices whose allow the communication between several computers but doing it without using wires. What is really interesting in using these networking interfaces is that a large part of communication protocols used on Ethernet interfaces can be used with these devices too!
Chapter 14 , Controller Area Network - CAN, will introduce the CAN bus that has been specifically designed to allow microcontrollers, computers and devices to communicate with each other in applications without a host computer by having a message-based protocol. The CAN bus is not so famous as Ethernet or WiFi but in the embedded world it is used and is not rare finding SoCs which support it by default.
Chapter 15 , Sound devices - SND, will introduce sound devices with some possible usages of them till to show to the reader how they can use them in order to generate audio how to implement a simple and low cost oscilloscope.
Chapter 16 , Video devices - V4L, will introduce common video acquisition devices with some possible usages of them till to show to the reader how they can turn our embedded kits into a surveillance camera or a remote image recorder.
Chapter 17 , Analog-to-Digital Converters - ADC, will introduce ADCs that can be used to get analogical signals from the environment. The chapter will show how to use them and how to use special software and hardware triggers in order to start conversions at specific timing or when some events occur.
Chapter 18 , Pulse-Width Modulation - PWM, will introduce PWMs that are able to encode a message into a pulsing signal (usually a square waveform) to generate an analog signal by using a digital source, then these messages can be used to control the power supplied to electrical motors or other electronics devices or, as we're going to show into this chapter, to control the position of a servo motor.
Chapter 19 , Miscellaneous devices, will introduce peripherals that can fit in one of the above chapters but that has not reported there for better readability. In this last chapter we're going to present a list of additional peripherals we can encounter into a monitoring or controlling system such as RFID and smart card readers, some digital and analog sensors, GSM/GPRS modem, Z-Wave, etc.