Using Embedded Linux with Nios II Processor · PDF file System Level Solution Using Embedded...

Click here to load reader

  • date post

    04-Aug-2020
  • Category

    Documents

  • view

    1
  • download

    0

Embed Size (px)

Transcript of Using Embedded Linux with Nios II Processor · PDF file System Level Solution Using Embedded...

  • System Level Solutions, Inc. (USA) 14100 Murphy Avenue San Martin, CA 95046 (408) 852 - 0067

    http://www.slscorp.com

    Using Embedded Linux with Nios II Processor

    User Guide

    BSP Version: 0.1.0.0 Document Version: 1.1

    Document Date: 03 January 2011

    http://www.slscorp.com

  • Copyright©2010, System Level Solutions.All rights reserved. SLS, An Embedded systems company, the stylized SLS logo, specific device designations, and all other words and logos that are identified as trademarks and/or service marks are, unless noted otherwise, the trademarks and service marks of SLS in India and other countries. All other products or service names are the property of their respective holders. SLS products are protected under numerous U.S. and foreign patents and pending applications, mask working rights, and copyrights. SLS warrants performance of its semiconductor products to current specifications in accordance with SLS is standard warranty, but reserves the right to make changes to any products and services at any time without notice. SLS assumes no responsibility or liability arising out of the application or use of any information, products, or service described herein except as expressly agreed to in writing by SLS. SLS customers are advised to obtain the latest version of specifications before relying on any published information and before orders for prod- ucts or services.

    ug_bsplnx-s4gxdk_v1.1

    ii Using Embedded Linux with Nios II Processor User Guide

    System Level Solutions January 2011

  • About this Guide

    Introduction This document explains how to create your own Nios II processor system for Linux and run a free, open source Linux distribution on a pre-built system.

    Table below shows the revision history of the user guide.

    How to Contact SLS

    For the most up-to-date information about SLS products, go to the SLS worldwide website at http://www.slscorp.com. For additional information about SLS products, consult the source shown below.

    Version Date Description 1.1 03 January 2011 Second Release.

    1.0 September 2010 First Release.

    Information Type E-mail Product literature services, SLS liter- ature services, Non-technical cus- tomer services, Technical support.

    [email protected]

    iii Using Embedded Linux with Nios II Processor User Guide

    System Level Solutions January 2011

    http://www.slscorp.com mailto:[email protected]

  • Typographic Conventions

    Typographic Conventions

    The document uses typographic conventions shown as below.

    Visual Cue Meaning Bold Type with Initial Capital Letters All Headings and Sub Headings Titles in a document are dis-

    played in bold type with initial capital letters; Example: Overview, Development Environment

    Bold Type with Italic Letters All Definitions, Figure and Table Headings are displayed in Italics. Examples: Figure 1-1. Development Environment

    1. 2. Numbered steps are used in a list of items, when the sequence of items is important such as steps listed in the procedure.

    • Bullets are used in a list of items when the sequence of items is not important.

    The hand points to information that requires special attention.

    The caution indicates required information that needs special con- sideration and understanding and should be read prior to starting or continuing with the procedure or process.

    The warning indicates information that should be read prior to starting or continuing the procedure or processes.

    The feet direct you to more information on a particular topic.

    iv System Level Solutions January 2011Using Embedded Linux with Nios II Processor User Guide

  • Contents

    About this Guide............................................................................................................................. iii Introduction..............................................................................................................................................iii How to Contact SLS ................................................................................................................................iii Typographic Conventions ........................................................................................................................ iv

    1. Getting Started............................................................................................................................. 1 Overview................................................................................................................................................... 1 Development Environment ....................................................................................................................... 1 Development Host..................................................................................................................................... 2 Development Target .................................................................................................................................. 3

    Configuring the Development Board................................................................................................. 3 System Setup............................................................................................................................................. 4 Downloading the BSP Package................................................................................................................. 4

    2. Designing a Nios II Hardware Reference Design...................................................................... 6 Introduction............................................................................................................................................... 6 Creating Hardware Design........................................................................................................................ 7 Memory Map and Linker Regions ............................................................................................................ 8 Compile the Hardware Design ................................................................................................................ 11

    3. Compiling and Running Linux with BSP ................................................................................ 12 Introduction............................................................................................................................................. 12 BSP.......................................................................................................................................................... 12 Configuring the BSP ............................................................................................................................... 12 Compiling the BSP.................................................................................................................................. 16 Running the BSP..................................................................................................................................... 16

    4. Creating User Application......................................................................................................... 20

    5. Customizing the Kernel............................................................................................................. 26 Generate a System Header File ............................................................................................................... 26

    1System Level Solutions

  • Configuring the Kernel ........................................................................................................................... 26 Linux Distribution Configuration .................................................................................................... 26 Linux Kernel Configuration............................................................................................................. 29 Device Drivers Configuration.......................................................................................................... 42 Memory Technology Device (MTD) support.................................................................................. 43 SCSI Device Support ....................................................................................................................... 44 Network Device Support ................................................................................................................. 46 I2C Support...................................................................................................................................... 49 SPI Support ...................................................................................................................................... 52 Input Device Support ....................................................................................................................... 54 PS2 Keyboard Support..................................................................................................................... 56 Altera Touchscreen Support ............................................................................................................ 58 Character Devices ............................................................................................................................ 60 Configuring JTAG UART ............................................................................................................... 60 Conf