An annotated guide to program and develop GNU/Linux Embedded systems quickly
About This Book
- 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
Who This Book Is 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
- Practical example usage of several devices such as RFID readers, Smart card readers, barcode readers, z-Wave devices, GSM/GPRS modems
- Usage of several sensors such as light, pressure, moisture, temperature, infrared, power, motion
Embedded computers have become very complex in the last few years and developers need to be able to easily manage embedded computer projects by focusing on problem solving; they should not have to waste time finding supported peripherals or learning how to manage them. This book shows you how to interact with external environments through specific peripherals used in the industry. It focuses on the latest Linux kernel release 4 and Debian/Ubuntu distributions (with embedded distributions such as OpenWRT and Yocto).
This book presents popular and user-friendly boards in the industry – such as Beaglebone Black, Atmel Xplained, Wandboard, and system-on-chip manufacturers – and lets you explore corresponding projects that make use of these boards. You will first program the embedded platforms using the C, Bash, and Python/PHP languages in order to get access to the external peripherals. You will gain a strong foundation in using embedded systems by learning how to program the device driver and access the peripherals. You will also learn how to read and write data from/to the external environment by using C programs or a scripting language (such as Bash/PHP/Python) and see how to configure a device driver for specific hardware.
The final chapter shows you how to use a micro-controller board – based on the most used microcontroller – to implement real-time or specific tasks that are normally not carried out on the GNU/Linux system. After finishing this book, you will be capable of applying these skills to your personal and professional projects.
Style and approach
This practical tutorial will get you quickly prototyping embedded systems on GNU/Linux. This book uses a variety of hardware to program the peripherals and build simple prototypes.
Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.
Table of Contents
GNU/Linux Rapid Embedded Programming
- GNU/Linux Rapid Embedded Programming
- About the Author
- About the Reviewer
- Customer Feedback
- What this book covers
- What you need for this book
- Who this book is for
- Reader feedback
- Customer support
1. Installing the Developing System
- Embedded world terms
- Systems' overview
Installing a development system
- Setting up the host machine
- Setting up the BeagleBone Black
- Setting up the SAMA5D3 Xplained
- Setting up the Wandboard
- Setting up the developing system
2. Managing the System Console
- Basic OS management
- A quick tour into the bootloader
3. C Compiler, Device Drivers, and Useful Developing Techniques
- The C compiler
- The Kernel and DTS files
- What is a device driver?
- The root filesystem (rootfs)
- The Network FileSystem (NFS)
- Using an emulator
4. Quick Programming with Scripts and System Daemons
- Setting up the system
- System daemons
- Scripting languages
- Writing a custom daemon
5. Setting Up an Embedded OS
- MTD versus block devices
- 6. General Purposes Input Output signals – GPIO
7. Serial Ports and TTY Devices - TTY
- What are TTY, serial, and UART lines?
- Implementations of serial ports
- The serial ports in Linux
- The communication parameters
- Getting access to TTYs
- Managing TTY in the kernel with SLIP
8. Universal Serial Bus - USB
- What is the universal serial bus?
- The USB bus in Linux
- The USB tools
- The raw USB bus
9. Inter-Integrated Circuits - I2C
- What is the Inter-Integrated Circuit bus?
- The I2C bus in Linux
- The I2C tools
- Getting access to I2C devices
- The Raw I2C Bus
10. Serial Peripheral Interface - SPI
- What is the Serial Peripheral Interface bus?
- The SPI bus in Linux
- The SPI tools
- Getting access to SPI devices
- The raw SPI bus
- 11. 1-Wire - W1
12. Ethernet Network Device - ETH
- What is an Ethernet network device?
- The Ethernet devices in Linux
- The net tools
- Communicating with a remote device
- The raw Ethernet bus
- Simple Ethernet bridging
13. Wireless Network Device - WLAN
- What is a wireless network device?
- WLAN devices in Linux
- The wireless tools
- The WPA supplicant
- The Hostapd daemon
- 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
- Title: GNU/Linux Rapid Embedded Programming
- Release date: March 2017
- Publisher(s): Packt Publishing
- ISBN: 9781786461803