logo资料库

cyusb3014工具链资料.pdf

第1页 / 共76页
第2页 / 共76页
第3页 / 共76页
第4页 / 共76页
第5页 / 共76页
第6页 / 共76页
第7页 / 共76页
第8页 / 共76页
资料共76页,剩余部分请下载后查看
Sourcery CodeBench Lite
Table of Contents
Preface
1. Intended Audience
2. Organization
3. Typographical Conventions
Chapter 1 Quick Start
1.1. Installation and Set-Up
1.2. Configuring Sourcery CodeBench Lite for the Target System
1.3. Building Your Program
1.4. Running and Debugging Your Program
Chapter 2 Installation and Configuration
2.1. Terminology
2.2. System Requirements
2.2.1. Host Operating System Requirements
2.2.2. Host Hardware Requirements
2.2.3. Target System Requirements
2.3. Downloading an Installer
2.4. Installing Sourcery CodeBench Lite
2.4.1. Using the Sourcery CodeBench Lite Installer on Microsoft Windows
2.4.2. Using the Sourcery CodeBench Lite Installer on GNU/Linux Hosts
2.4.3. Installing Sourcery CodeBench Lite from a Compressed Archive
2.5. Installing Sourcery CodeBench Lite Updates
2.6. Setting up the Environment
2.6.1. Setting up the Environment on Microsoft Windows Hosts
2.6.1.1. Setting the PATH
2.6.1.2. Working with Cygwin
2.6.2. Setting up the Environment on GNU/Linux Hosts
2.7. Customer Experience Improvement Program
2.8. Uninstalling Sourcery CodeBench Lite
2.8.1. Using the Sourcery CodeBench Lite Uninstaller on Microsoft Windows
2.8.2. Using the Sourcery CodeBench Lite Uninstaller on GNU/Linux
2.8.3. Uninstalling a Compressed Archive Installation
Chapter 3 Sourcery CodeBench Lite for ARM EABI
3.1. Included Components and Features
3.2. Library Configurations
3.3. Using Flash Memory
3.4. Using VFP Floating Point
3.4.1. Enabling Hardware Floating Point
3.4.2. NEON SIMD Code
3.4.3. Half-Precision Floating Point
3.5. Fixed-Point Arithmetic
3.6. ABI Compatibility
3.7. ARM Profiling Implementation
3.8. Object File Portability
Chapter 4 Using Sourcery CodeBench from the Command Line
4.1. Building an Application
4.2. Running Applications on the Target System
4.3. Running Applications from GDB
4.3.1. Connecting to an External GDB Server
4.3.2. Loading and Running Applications
4.4. Using the Compiler Cache
4.4.1. Invoking arm-none-eabi-cs
Chapter 5 CS3™: The CodeSourcery Common Startup Code Sequence
5.1. Linker Scripts
5.1.1. Program and Data Placement
5.1.2. Hosting and Semihosting
5.1.3. Specifying a Linker Script
5.2. Program Startup and Termination
5.2.1. The Hard Reset Phase
5.2.2. The Assembly Initialization Phase
5.2.3. The C Initialization Phase
5.2.4. Arguments to main
5.2.5. Program Termination
5.3. Memory Layout
5.3.1. Memory Regions and Program Sections
5.3.2. Programmatic Access to the CS3 Memory Map
5.3.3. Heap and Stack Placement
5.4. Interrupt Vectors and Handlers
5.4.1. ARM EABI Interrupt Vector Implementation
5.4.2. Writing Interrupt Handlers
5.5. Supported Boards for ARM EABI
5.6. Interrupt Vector Tables
5.6.1. __cs3_​interrupt_​vector_​arm
5.6.2. __cs3_​interrupt_​vector_​micro
Chapter 6 Next Steps with Sourcery CodeBench
6.1. Sourcery CodeBench Knowledge Base
6.2. Manuals for GNU Toolchain Components
Appendix A Sourcery CodeBench Lite Release Notes
A.1. Changes in Sourcery CodeBench Lite for ARM EABI
A.1.1. Changes in Sourcery CodeBench Lite 2013.11-24
A.1.2. Changes in Sourcery CodeBench Lite 2013.05-23
A.1.3. Changes in Sourcery CodeBench Lite 2013.05-4
A.1.4. Changes in Sourcery CodeBench Lite 2012.09-63
A.1.5. Changes in Sourcery CodeBench Lite 2012.09-17
A.1.6. Changes in Older Releases
Appendix B Sourcery CodeBench Lite Licenses
B.1. Sourcery CodeBench Lite License Agreement
B.1.1. Embedded Software and Hardware License Agreement
B.2. Licenses for Sourcery CodeBench Lite Components
B.2.1. Mentor Graphics Proprietary Components
B.2.2. Components
B.2.3. Third-Party Information
B.2.3.1. Unzip
B.3. Attribution
B.3.1. Android Open Source Project
B.3.2. Newlib
***Linker Scripts
Sourcery CodeBench Lite ARM EABI Sourcery CodeBench Lite 2013.11-24 Getting Started
Sourcery CodeBench Lite: ARM EABI: Sourcery CodeBench Lite 2013.11-24: Getting Started Mentor Graphics, Inc. Copyright © 2005, 2006, 2007, 2008, 2009, 2010, 2011 CodeSourcery, Inc. Copyright © 2012, 2013 Mentor Graphics, Inc. All rights reserved. Abstract This guide explains how to install and build applications with Sourcery CodeBench Lite, Code- Sourcery's customized and validated version of the GNU Toolchain. Sourcery CodeBench Lite includes everything you need for application development, including C and C++ compilers, assemblers, linkers, and libraries. When you have finished reading this guide, you will kno w how to use Sourcery CodeBench from the command line.
Table of Contents Preface ..................................................................................................................... iv 1. Intended Audience ............................................................................................ v 2. Organization .................................................................................................... v 3. Typographical Conventions ............................................................................... vi 1. Quick Start .............................................................................................................. 1 1.1. Installation and Set-Up ................................................................................... 2 1.2. Configuring Sourcery CodeBench Lite for the Target System ................................. 2 1.3. Building Your Program ................................................................................... 2 1.4. Running and Debugging Your Program .............................................................. 2 2. Installation and Configuration ..................................................................................... 4 2.1. Terminology ................................................................................................. 5 2.2. System Requirements ..................................................................................... 5 2.3. Downloading an Installer ................................................................................. 5 2.4. Installing Sourcery CodeBench Lite .................................................................. 6 2.5. Installing Sourcery CodeBench Lite Updates ....................................................... 9 2.6. Setting up the Environment .............................................................................. 9 2.7. Customer Experience Improvement Program ..................................................... 11 2.8. Uninstalling Sourcery CodeBench Lite ............................................................. 12 3. Sourcery CodeBench Lite for ARM EABI ................................................................... 14 3.1. Included Components and Features .................................................................. 15 3.2. Library Configurations .................................................................................. 15 3.3. Using Flash Memory .................................................................................... 16 3.4. Using VFP Floating Point .............................................................................. 16 3.5. Fixed-Point Arithmetic .................................................................................. 18 3.6. ABI Compatibility ........................................................................................ 18 3.7. ARM Profiling Implementation ....................................................................... 19 3.8. Object File Portability ................................................................................... 20 4. Using Sourcery CodeBench from the Command Line .................................................... 21 4.1. Building an Application ................................................................................. 22 4.2. Running Applications on the Target System ....................................................... 22 4.3. Running Applications from GDB .................................................................... 22 4.4. Using the Compiler Cache ............................................................................. 23 5. CS3™: The CodeSourcery Common Startup Code Sequence .......................................... 25 5.1. Linker Scripts .............................................................................................. 26 5.2. Program Startup and Termination .................................................................... 28 5.3. Memory Layout ........................................................................................... 30 5.4. Interrupt Vectors and Handlers ........................................................................ 33 5.5. Supported Boards for ARM EABI ................................................................... 34 5.6. Interrupt Vector Tables .................................................................................. 35 6. Next Steps with Sourcery CodeBench ......................................................................... 37 6.1. Sourcery CodeBench Knowledge Base ............................................................. 38 6.2. Manuals for GNU Toolchain Components ......................................................... 38 A. Sourcery CodeBench Lite Release Notes .................................................................... 39 A.1. Changes in Sourcery CodeBench Lite for ARM EABI ........................................ 40 B. Sourcery CodeBench Lite Licenses ........................................................................... 44 B.1. Sourcery CodeBench Lite License Agreement ................................................... 45 B.2. Licenses for Sourcery CodeBench Lite Components ........................................... 55 B.3. Attribution .................................................................................................. 57 iii
Preface This preface introduces the Sourcery CodeBench Lite Getting Started guide. It explains the structure of this guide and describes the documentation conventions used. iv
Preface 1. Intended Audience This guide is written for people who will install and/or use Sourcery CodeBench Lite. This guide provides a step-by-step guide to installing Sourcery CodeBench Lite and to building simple applica- tions. Parts of this document assume that you have some familiarity with using the command-line interface. 2. Organization This document is organized into the following chapters and appendices: Chapter 1, “Quick Start” Chapter 2, “Installation and Config- uration” Chapter 3, “Sourcery CodeBench Lite for ARM EABI” Chapter 4, “Using Sourcery CodeBench from the Command Line” Chapter 5, “CS3™: The Code- Sourcery Common Startup Code Se- quence” Chapter 6, “Next Steps with Sourcery CodeBench” Appendix A, “Sourcery CodeBench Lite Release Notes” Appendix B, “Sourcery CodeBench Lite Licenses” This chapter includes a brief checklist to follow when in- stalling and using Sourcery CodeBench Lite for the first time. You may use this chapter as an abbreviated guide to the rest of this manual. This chapter describes how to download, install and configure Sourcery CodeBench Lite. This section describes the available installation options and explains how to set up your environ- ment so that you can build applications. This chapter contains information about using Sourcery CodeBench Lite that is specific to ARM EABI targets. You should read this chapter to learn how to best use Sourcery CodeBench Lite on your target system. This chapter explains how to build applications with Sourcery CodeBench Lite using the command line. In the process of reading this chapter, you will build a simple application that you can use as a model for your own programs. CS3 is CodeSourcery's low-level board support library. This chapter documents the boards supported by Sourcery CodeBench Lite and the compiler and linker options you need to use with them. It also explains how you can use and modify CS3-provided definitions for memory maps, system startup code and interrupt vectors in your own code. This chapter describes where you can find additional docu- mentation and information about using Sourcery CodeBench Lite and its components. It also provides information about Sourcery CodeBench subscriptions. CodeSourcery customers with Sourcery CodeBench subscriptions receive comprehens- ive support for Sourcery CodeBench. This appendix contains information about changes in this re- lease of Sourcery CodeBench Lite for ARM EABI. You should read through these notes to learn about new features and bug fix es. This appendix provides information about the software li- censes that apply to Sourcery CodeBench Lite. Read this ap- pendix to understand your legal rights and obligations as a user of Sourcery CodeBench Lite. v
Preface 3. Typographical Conventions The following typographical conventions are used in this guide: > command arg ... A command, typed by the user, and its output. The “>” character is the command prompt. command The name of a program, when used in a sentence, rather than in literal input or output. literal Text provided to or received from a computer program. placeholder Text that should be replaced with an appropriate value when typing a command. \ At the end of a line in command or program examples, indicates that a long line of literal input or output continues onto the next line in the document. vi
Chapter 1 Quick Start This chapter includes a brief checklist to follow when installing and using Sourcery CodeBench Lite for the first time. You may use this chapter as an abbreviated guide to the rest of this manual. 1
Quick Start Sourcery CodeBench Lite for ARM EABI is intended for developers working on embedded applic- ations or firmw are for boards without an operating system, or that run an RTOS or boot loader. This Sourcery CodeBench configuration is not intended for Linux or uClinux k ernel or application devel- opment. Follow the steps given in this chapter to install Sourcery CodeBench Lite and build and run your first application program. The checklist given here is not a tutorial and does not include detailed in- structions for each step; however, it will help guide you to find the instructions and reference inform- ation you need to accomplish each step. You can find additional details about the components, libraries, and other features included in this version of Sourcery CodeBench Lite in Chapter 3, “Sourcery CodeBench Lite for ARM EABI”. 1.1. Installation and Set-Up Install Sourcery CodeBench Lite on your host computer. You may download an installer package from the Sourcery CodeBench web site1, or you may have received an installer on CD. The installer is an executable program that pops up a window on your computer and leads you through a series of dialogs to configure your installation. When the installation is complete, it offers to launch the Getting Started guide. For more information about installing Sourcery CodeBench Lite, including host system requirements and tips to set up your environment after installation, refer to Chapter 2, “Installation and Configuration” . Install drivers for your debug device. Sourcery CodeBench Lite supports third-party debug devices that communicate via the GDB remote serial protocol. If you plan to use one of these devices, follow the manufacturer's directions to connect the device and install any required drivers or software. 1.2. Configuring Sourcery CodeBench Lite for the Target System Identify your target board. On bare-metal targets, you must explicitly specify a linker script for your target board on your link command line. Supported boards are listed in Chapter 5, “CS3™: The CodeSourcery Common Startup Code Sequence”. 1.3. Building Your Program Build your program with Sourcery CodeBench command-line tools. Create a simple test program, and follow the directions in Chapter 4, “Using Sourcery CodeBench from the Command Line” to compile and link it using Sourcery CodeBench Lite. On bare-metal targets, you must specify a linker script using the -T option on your link command line. Supported boards and linker scripts are listed in Chapter 5, “CS3™: The CodeSourcery Common Startup Code Sequence”. 1.4. Running and Debugging Your Program The steps to run or debug your program depend on your target system and how it is configured. Choose the appropriate method for your target. Debug your program on the target using a third-party debug device. Sourcery CodeBench supports debugging programs on the remote target using third-party debug devices that can commu- 1 http://go.mentor.com/codebench/ 2
分享到:
收藏