You are previewing ARM System Developer's Guide.
O'Reilly logo
ARM System Developer's Guide

Book Description

Over the last ten years, the ARM architecture has become one of the most pervasive architectures in the world, with more than 2 billion ARM-based processors embedded in products ranging from cell phones to automotive braking systems. A world-wide community of ARM developers in semiconductor and product design companies includes software developers, system designers and hardware engineers. To date no book has directly addressed their need to develop the system and software for an ARM-based system. This text fills that gap.

This book provides a comprehensive description of the operation of the ARM core from a developer’s perspective with a clear emphasis on software. It demonstrates not only how to write efficient ARM software in C and assembly but also how to optimize code. Example code throughout the book can be integrated into commercial products or used as templates to enable quick creation of productive software.

The book covers both the ARM and Thumb instruction sets, covers Intel's XScale Processors, outlines distinctions among the versions of the ARM architecture, demonstrates how to implement DSP algorithms, explains exception and interrupt handling, describes the cache technologies that surround the ARM cores as well as the most efficient memory management techniques. A final chapter looks forward to the future of the ARM architecture considering ARMv6, the latest change to the instruction set, which has been designed to improve the DSP and media processing capabilities of the architecture.

* No other book describes the ARM core from a system and software perspective.
* Author team combines extensive ARM software engineering experience with an in-depth knowledge of ARM developer needs.
* Practical, executable code is fully explained in the book and available on the publisher's Website.
* Includes a simple embedded operating system.

Table of Contents

  1. Cover
  2. Title Page
  3. Copyright
  4. About the Authors
  5. Preface
  6. Table of Contents
  7. Chapter 1: ARM Embedded Systems
    1. 1.1 The RISC Design Philosophy
    2. 1.2 The ARM Design Philosophy
    3. 1.3 Embedded System Hardware
    4. 1.4 Embedded System Software
    5. 1.5 Summary
  8. Chapter 2: ARM Processor Fundamentals
    1. 2.1 Registers
    2. 2.2 Current Program Status Register
    3. 2.3 Pipeline
    4. 2.4 Exceptions, Interrupts, and the Vector Table
    5. 2.5 Core Extensions
    6. 2.6 Architecture Revisions
    7. 2.7 ARM Processor Families
    8. 2.8 Summary
  9. Chapter 3: Introduction to the ARM Instruction Set
    1. 3.1 Data Processing Instructions
    2. 3.2 Branch Instructions
    3. 3.3 Load-Store Instructions
    4. 3.4 Software Interrupt Instruction
    5. 3.5 Program Status Register Instructions
    6. 3.6 Loading Constants
    7. 3.7 ARMv5E Extensions
    8. 3.8 Conditional Execution
    9. 3.9 Summary
  10. Chapter 4: Introduction to the Thumb Instruction Set
    1. 4.1 Thumb Register Usage
    2. 4.2 ARM-Thumb Interworking
    3. 4.3 Other Branch Instructions
    4. 4.4 Data Processing Instructions
    5. 4.5 Single-Register Load-Store Instructions
    6. 4.6 Multiple-Register Load-Store Instructions
    7. 4.7 Stack Instructions
    8. 4.8 Software Interrupt Instruction
    9. 4.9 Summary
  11. Chapter 5: Efficient C Programming
    1. 5.1 Overview of C Compilers and Optimization
    2. 5.2 Basic C Data Types
    3. 5.3 C Looping Structures
    4. 5.4 Register Allocation
    5. 5.5 Function Calls
    6. 5.6 Pointer Aliasing
    7. 5.7 Structure Arrangement
    8. 5.8 Bit-Fields
    9. 5.9 Unaligned Data and Endianness
    10. 5.10 Division
    11. 5.11 Floating Point
    12. 5.12 Inline Functions and Inline Assembly
    13. 5.13 Portability Issues
    14. 5.14 Summary
  12. Chapter 6: Writing and Optimizing ARM Assembly Code
    1. 6.1 Writing Assembly Code
    2. 6.2 Profiling and Cycle Counting
    3. 6.3 Instruction Scheduling
    4. 6.4 Register Allocation
    5. 6.5 Conditional Execution
    6. 6.6 Looping Constructs
    7. 6.7 Bit Manipulation
    8. 6.8 Efficient Switches
    9. 6.9 Handling Unaligned Data
    10. 6.10 Summary
  13. Chapter 7: Optimized Primitives
    1. 7.1 Double-Precision Integer Multiplication
    2. 7.2 Integer Normalization and Count Leading Zeros
    3. 7.3 Division
    4. 7.4 Square Roots
    5. 7.5 Transcendental Functions: log, exp, sin, cos
    6. 7.6 Endian Reversal and Bit Operations
    7. 7.7 Saturated and Rounded Arithmetic
    8. 7.8 Random Number Generation
    9. 7.9 Summary
  14. Chapter 8: Digital Signal Processing
    1. 8.1 Representing a Digital Signal
    2. 8.2 Introduction to DSP on the ARM
    3. 8.3 FIR Filters
    4. 8.4 HR Filters
    5. 8.5 The Discrete Fourier Transform
    6. 8.6 Summary
  15. Chapter 9: Exception and Interrupt Handling
    1. 9.1 Exception Handling
    2. 9.2 Interrupts
    3. 9.3 Interrupt Handling Schemes
    4. 9.4 Summary
  16. Chapter 10: Firmware
    1. 10.1 Firmware and Bootloader
    2. 10.2 Example: Sandstone
    3. 10.3 Summary
  17. Chapter 11: Embedded Operating Systems
    1. 11.1 Fundamental Components
    2. 11.2 Example: Simple Little Operating System
    3. 11.3 Summary
  18. Chapter 12: Caches
    1. 12.1 The Memory Hierarchy and Cache Memory
    2. 12.2 Cache Architecture
    3. 12.3 Cache Policy
    4. 12.4 Coprocessor 15 and Caches
    5. 12.5 Flushing and Cleaning Cache Memory
    6. 12.6 Cache Lockdown
    7. 12.7 Caches and Software Performance
    8. 12.8 Summary
  19. Chapter 13: Memory Protection Units
    1. 13.1 Protected Regions
    2. 13.2 Initializing the MPU, Caches, and Write Buffer
    3. 13.3 Demonstration of an MPU System
    4. 13.4 Summary
  20. Chapter 14: Memory Management Units
    1. 14.1 Moving from an MPU to an MMU
    2. 14.2 How Virtual Memory Works
    3. 14.3 Details of the ARM MMU
    4. 14.4 Page Tables
    5. 14.5 The Translation Lookaside Buffer
    6. 14.6 Domains and Memory Access Permission
    7. 14.7 The Caches and Write Buffer
    8. 14.8 Coprocessor 15 and MMU Configuration
    9. 14.9 The Fast Context Switch Extension
    10. 14.10 Demonstration: A Small Virtual Memory System
    11. 14.11 The Demonstration as mmuSLOS
    12. 14.12 Summary
  21. Chapter 15: The Future of the Architecture
    1. 15.1 Advanced DSP and SIMD Support in ARMv6
    2. 15.2 System and Multiprocessor Support Additions to ARMv6
    3. 15.3 ARMv6 Implementations
    4. 15.4 Future Technologies beyond ARMv6
    5. 15.5 Summary
  22. APPENDIX A: ARM and Thumb Assembler Instructions
    1. A.1 Using This Appendix
    2. A.2 Syntax
    3. A.3 Alphabetical List of ARM and Thumb Instructions
    4. A.4 ARM Assembler Quick Reference
    5. A.5 GNU Assembler Quick Reference
  23. APPENDIX B: ARM and Thumb Instruction Encoding
    1. B.1 ARM Instruction Set Encodings
    2. B.2 Thumb Instruction Set Encodings
    3. B.3 Program Status Registers
  24. APPENDIX C: Processors and Architecture
    1. C.1 ARM Naming Convention
    2. C.2 Core and Architectures
  25. APPENDIX D: Instruction Cycle Timings
    1. D.1 Using the Instruction Cycle Timing Tables
    2. D.2 ARM7TDMI Instruction Cycle Timings
    3. D.3 ARM9TDMI Instruction Cycle Timings
    4. D.4 StrongARM1 Instruction Cycle Timings
    5. D.5 ARM9E Instruction Cycle Timings
    6. D.6 ARM10E Instruction Cycle Timings
    7. D.7 Intel Xscale Instruction Cycle Timings
    8. D.8 ARM11 Cycle Timings
  26. APPENDIX E: Suggested Reading
    1. E.1 ARM references
    2. E.2 Algorithm References
    3. E.3 Memory Management and CacheArchitecture (Hardware Overview and Reference)
    4. E.4 Operating System References
  27. Index
  28. Instructions for online access