Embedded Programming with Android: Bringing Up an Android System from Scratch
Read it now on the O’Reilly learning platform with a 10-day free trial.
O’Reilly members get unlimited access to books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.
Book description
The First Practical, Hands-On Guide to Embedded System Programming for Android
Today, embedded systems programming is a more valuable discipline than ever, driven by fast-growing, new fields such as wearable technology and the Internet of Things. In this concise guide, Roger Ye teaches all the skills you’ll need to write the efficient embedded code necessary to make tomorrow’s Android devices work.
The first title in Addison-Wesley’s new Android™ Deep Dive series for intermediate and expert Android developers, Embedded Programming with Android™ draws on Roger Ye’s extensive experience with advanced projects in telecommunications and mobile devices. Step by step, he guides you through building a system with all the key components Android hardware developers must deliver to manufacturing. By the time you’re done, you’ll have the key programming, compiler, and debugging skills you’ll need for real-world projects.
First, Ye introduces the essentials of bare-metal programming: creating assembly language code that runs directly on hardware. Then, building on this knowledge, he shows how to use C to create hardware interfaces for booting a Linux kernel with the popular U-Boot bootloader. Finally, he walks you through using filesystem images to boot Android and learning to build customized ROMs to support any new Android device. Throughout, Ye provides extensive downloadable code you can run, explore, and adapt.
Show and hide more
Table of contents Product information
Table of contents
- About This eBook
- Title Page
- Copyright Page
- About the Android Deep Dive Series
- About the Series Editor
- Who Should Read This Book
- How This Book Is Organized
- Example Code
- Conventions Used in This Book
- 1. Introduction to Embedded System Programming
- What Is an Embedded System?
- Bare Metal Programming
- Learning Embedded System Programming
- Software Layers in an Embedded System
- Tools and Hardware Platform
- The Difference between Virtual Hardware and Real Hardware
- Summary
- Overview of the Virtual Hardware
- Configuring Android Virtual Devices
- Hardware Interfaces
- Serial
- Timer
- Summary
- The Host and Client Environments
- Development Environment Setup
- Downloading and Installing Android SDK
- Downloading and Installing the GNU Toolchain for ARM
- Integrated Development Environment
- Your First ARM Program
- Building the Binary
- Running in the Android Emulator
- makefile for the Example Projects
- Summary
- Memory Map
- Linker
- Symbol Resolution
- Relocation
- Section Merging
- Section Placement
- Linker Script Example
- Specifying Load Address
- Copying .data to RAM
- C Startup in a Bare Metal Environment
- Stack
- Global Variables
- Read-Only Data
- Startup Code
- Calling C Functions from Assembly Language Code
- Calling Assembly Language Functions from C Code
- Check Data Buffer
- Data Input and Output
- Unit Test of Serial Functions
- C Library Variants
- C Library Variants in an Operating System
- C Library Variants in Bare Metal Environment
- Semihosting Support in Newlib C
- Semihosting Example Code
- Goldfish Interrupt Controller
- The Simplest Interrupt Handler
- Interrupt Support Functions
- Implementation of the Simplest Interrupt Handler
- Implementation of the Nested Interrupt Handler
- Testing Nested Interrupts and Discovering the Processor Mode Switch
- Goldfish-Specific Timer Functions
- U-Boot API
- Unit Test of Timer and RTC
- Android File System
- NAND Flash Properties
- NAND Flash Programming Interface in the Goldfish Platform
- Memory Technology Device Support
- MTD API
- U-Boot API to Support NAND Flash
- Goldfish NAND Flash Driver Functions
- NAND Flash Information from the Linux Kernel
- NAND Flash Test Program
- 9. U-Boot Porting
- Introducing U-Boot
- Downloading and Compiling U-Boot
- Debugging U-Boot with GDB
- Porting U-Boot to the Goldfish Platform
- Creating a New Board
- Processor-Specific Changes
- Board-Specific Changes
- Device Driver Changes
- Building the Goldfish Kernel
- Prebuilt Toolchain and Kernel Source Code
- Running and Debugging the Kernel in the Emulator
- Booting Android from NOR Flash
- Creating the RAMDISK Image
- Creating the Flash Image
- Booting Up the Flash Image
- Source-Level Debugging of the Flash Image
- Preparing system.img
- Booting from NAND Flash
- 11. Building Your Own AOSP and CyanogenMod
- Introducing AOSP and CyanogenMod
- Setting Up an Android Virtual Device
- AOSP Android Emulator Build
- AOSP Build Environment
- Downloading the AOSP Source
- Building AOSP Android Emulator Images
- Testing AOSP Images
- Downloading the CyanogenMod Source
- Building CyanogenMod Android Emulator Images
- Testing CyanogenMod Images
- Supporting New Hardware in AOSP
- Building the Kernel with AOSP
- Building U-Boot with AOSP
- Booting Android with U-Boot from NAND Flash
- Building the Kernel with CyanogenMod
- Building U-Boot and Booting Up CyanogenMod
- A. Building the Source Code for This Book
- Setting Up the Build Environment
- Setting Up a Virtual Machine
- Organization of Source Code
- Source Code for Part I
- Building and Testing from the Command Line
- Building and Testing in Eclipse
- Building AOSP
- Building CyanogenMod
- Resources for Repo
- Syncing a New Source Tree In Minutes
- Downloading Git Repositories Using Local Manifest
Show and hide more
Product information
- Title: Embedded Programming with Android: Bringing Up an Android System from Scratch
- Author(s): Roger Ye
- Release date: August 2015
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780134030920
You might also like
Check it out now on O’Reilly
Dive in for free with a 10-day trial of the O’Reilly learning platform—then explore all the other resources our members count on to build skills and solve problems every day.