Embedded Programming with Android: Bringing Up an Android System from Scratch
β Scribed by Roger Ye
- Publisher
- Addison-Wesley
- Year
- 2016
- Tongue
- English
- Leaves
- 400
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
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.
You will
- Build a complete virtualized environment for embedded development
- Understand the workflow of a modern embedded systems project
- Develop assembly programs, create binary images, and load and run them in the Android emulator
- Learn what it takes to bring up a bootloader and operating system
- Move from assembler to C, and explore Androidβs goldfish hardware interfaces
- Program serial ports, interrupt controllers, real time clocks, and NAND flash controllers
- Integrate C runtime libraries
- Support exception handling and timing
- Use U-Boot to boot the kernel via NOR or NAND flash processes
- Gain in-depth knowledge for porting U-Boot to new environments
- Integrate U-Boot and a Linux kernel into an AOSP and CyanogenMod source tree
- Create your own Android ROM on a virtual Android device
β¦ Table of Contents
Contents
Preface
Acknowledgments
About the Author
I: Bare Metal Programming
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
2 Inside Android Emulator
Overview of the Virtual Hardware
Configuring Android Virtual Devices
Hardware Interfaces
Serial
Timer
Summary
3 Setting Up the Development Environment
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
4 Linker Script and Memory Map
Memory Map
Linker
Linker Script
Initializing Data in RAM
Summary
5 Using the C Language
C Startup in a Bare Metal Environment
Calling Convention
Goldfish Serial Port Support
Summary
6 Using the C Library
C Library Variants
Newlib C Library
Common Startup Code Sequence
CS3 Linker Scripts
Customized CS3 Startup Code for the Goldfish Platform
System Call Implementations
Running and Debugging the Library
Using Newlib with QEMU ARM Semihosting
Summary
7 Exception Handling and Timer
Goldfish Interrupt Controller
The Simplest Interrupt Handler
Nested Interrupt Handler
Testing System Calls/Software Interrupts
Timer
Real-Time Clock
Summary
8 NAND Flash Support in Goldfish
Android File System
NAND Flash Properties
NAND Flash Programming in the Goldfish Platform
Memory Technology Device Support
MTD API
NAND Flash Programming Interface Test Program
Summary
II: U-Boot
9 U-Boot Porting
Introducing U-Boot
Downloading and Compiling U-Boot
Debugging U-Boot with GDB
Porting U-Boot to the Goldfish Platform
Summary
10 Using U-Boot to Boot the Goldfish Kernel
Building the Goldfish Kernel
Prebuilt Toolchain and Kernel Source Code
Running and Debugging the Kernel in the Emulator
Booting Android from NOR Flash
Booting Android from NAND Flash
Summary
III: Android System Integration
11 Building Your Own AOSP and CyanogenMod
Introducing AOSP and CyanogenMod
Setting Up an Android Virtual Device
AOSP Android Emulator Build
CyanogenMod Android Emulator Build
Summary
12 Customizing Android and Creating Your Own Android ROM
Supporting New Hardware in AOSP
Supporting New Hardware in CyanogenMod
Summary
IV: Appendixes
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
Source Code for Part II
Source Code for Part III
B: Using Repo in This Book
Resources for Repo
Syncing a New Source Tree In Minutes
Downloading Git Repositories Using Local Manifest
Index
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
π SIMILAR VOLUMES
<p><b>A hands-on introduction to the latest release of the Android OS and the easiest Android tools for developers</b></p> <p>As the dominant mobile platform today, the Android OS is a powerful and flexible platform for mobile device. The new Android 7 release (New York Cheesecake) boasts significan
A hands-on introduction to the latest release of the Android OS and the easiest Android tools for developers As the dominant mobile platform today, the Android OS is a powerful and flexible platform for mobile device. The new Android 7 release (New York Cheesecake) boasts significant new features an
A hands-on introduction to the latest release of the Android OS and the easiest Android tools for developers As the dominant mobile platform today, the Android OS is a powerful and flexible platform for mobile device. The new Android 7 release (New York Cheesecake) boasts significant new features