Sourcery™ CodeBench Lite

MIPS ELF

Sourcery CodeBench Lite 2015.11-33

Getting Started

Mentor Graphics®, Inc.

Version Sourcery CodeBench Lite 2015.11-33

This document is for information and instruction purposes. Mentor Graphics reserves the right to make changes in specifications and other information contained in this publication without prior notice, and the reader should, in all cases, consult Mentor Graphics to determine whether any changes have been made.

The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in written agreements between Mentor Graphics and its customers. No representation or other affirmation of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor Graphics whatsoever.

MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT, EVEN IF MENTOR GRAPHICS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at private expense and are commercial computer software and commercial computer software documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S. Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth in the license agreement provided with the software, except for provisions which are contrary to applicable mandatory federal laws.

TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior written consent of Mentor Graphics or the owner of the Mark, as applicable. The use herein of a third-party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended to indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics' trademarks may be viewed at: www.mentor.com/trademarks.

The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.


Mentor Graphics Corporation
8005 S.W. Boeckman Road
WilsonvilleOregon 97070-7777

Contacting Mentor Graphics Corporation 
Telephone: 503.685.7000
Toll-Free Telephone: 800.592.2210
SupportNet: supportnet.mentor.com

Send Feedback on Documentation: supportnet.mentor.com/doc_feedback_form

Abstract

This guide explains how to install and build applications with Sourcery CodeBench Lite, CodeSourcery'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 know how to use Sourcery CodeBench from the command line.


Table of Contents

Preface
1. Intended Audience
2. Organization
3. Typographical Conventions
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
2. Installation and Configuration
2.1. Terminology
2.2. System Requirements
2.3. Registering with the Sourcery CodeBench Portal
2.4. Downloading an Installer
2.5. Installing Sourcery CodeBench Lite
2.6. Installing Sourcery CodeBench Lite Updates
2.7. Setting up the Environment
2.8. Uninstalling Sourcery CodeBench Lite
3. Sourcery CodeBench Lite for MIPS ELF
3.1. Included Components and Features
3.2. Library Configurations
3.3. CS3 Support
3.4. Using Sourcery CodeBench with MIPS Boards
3.5. Using Sourcery CodeBench with YAMON
3.6. Profiling Support
3.7. Using Flash Memory
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
5. CS3: The CodeSourcery Common Startup Code Sequence
5.1. Linker Scripts
5.2. Program Startup and Termination
5.3. Memory Layout
5.4. Interrupt Vectors and Handlers
5.5. Supported Boards for MIPS ELF
6. Sourcery CodeBench Debug Sprite
6.1. Probing for Debug Devices
6.2. Debug Sprite Example
6.3. Invoking Sourcery CodeBench Debug Sprite
6.4. Sourcery CodeBench Debug Sprite Options
6.5. MDI Devices
6.6. Debugging a Remote Board
6.7. Supported Board Files
6.8. Board File Syntax
7. Next Steps with Sourcery CodeBench
7.1. Sourcery CodeBench Knowledge Base
7.2. Manuals for GNU Toolchain Components
A. Sourcery CodeBench Lite Release Notes
A.1. Changes in Sourcery CodeBench Lite for MIPS ELF
B. Sourcery CodeBench Lite Licenses
B.1. Sourcery CodeBench Lite License Agreement
B.2. Licenses and Third-Party Information for Sourcery CodeBench Lite Components
B.3. Attribution