【文件名】:07318@52RD_NiosII软件开发者手册.pdf
【格 式】:pdf
【大 小】:2121K
【简 介】:NiosII软件使用介绍
【目 录】:Section I. Nios II Software Development
Revision History ....................................................................................................................... Section I–1
Chapter 1. Overview
Introduction ............................................................................................................................................ 1–1
Getting Started ...................................................................................................................................... 1–1
Development Environment .................................................................................................................. 1–1
Tools ................................................................................................................................................... 1–1
Consistent Development Environment ......................................................................................... 1–3
Consistent Runtime Environment ................................................................................................. 1–3
Third-Party Support .............................................................................................................................. 1–3
Migrating from the First-Generation Nios Processor ....................................................................... 1–4
Further Nios II Information ................................................................................................................. 1–4
Chapter 2. Tour of the NiosIIIDE
Introduction ............................................................................................................................................ 2–1
The Nios II IDE Workbench ................................................................................................................. 2–1
Perspectives, Editors & Views ........................................................................................................ 2–2
Creating a New Project ......................................................................................................................... 2–3
Building & Managing Projects ............................................................................................................. 2–4
Running & Debugging Programs ........................................................................................................ 2–5
Programming Flash ............................................................................................................................... 2–9
Online Help .......................................................................................................................................... 2–10
Section II. The HAL System Library
Revision History ..................................................................................................................... Section II–1
Chapter 3. Overview of the HAL System Library
Introduction ............................................................................................................................................ 3–1
Getting Started ....................................................................................................................................... 3–1
HAL Architecture .................................................................................................................................. 3–2
Services .............................................................................................................................................. 3–2
Applications vs. Drivers .................................................................................................................. 3–3
Generic Device Models .................................................................................................................... 3–3
C Standard Library—Newlib ......................................................................................................... 3–4
Supported Peripherals .......................................................................................................................... 3–5
hapter 4. Developing Programs using the HAL
Introduction ............................................................................................................................................ 4–1
The Nios II IDE Project Structure ........................................................................................................ 4–1
The system.h System Description File ................................................................................................ 4–2
Data Widths & the HAL Type Definitions ......................................................................................... 4–3
UNIX-Style Interface ............................................................................................................................. 4–4
File System .............................................................................................................................................. 4–5
Using Character-Mode Devices ........................................................................................................... 4–6
Standard Input, Standard Output & Standard Error .................................................................. 4–7
General Access to Character Mode Devices ................................................................................. 4–7
C++ Streams ...................................................................................................................................... 4–8
/dev/null .......................................................................................................................................... 4–8
Using File Subsystems .......................................................................................................................... 4–8
Using Timer Devices ............................................................................................................................. 4–8
The HAL System Clock ................................................................................................................... 4–9
Alarms ................................................................................................................................................ 4–9
High Resolution Time Measurement .......................................................................................... 4–11
Using Flash Devices ............................................................................................................................ 4–12
Simple Flash Access ....................................................................................................................... 4–12
Block Erasure or Corruption ......................................................................................................... 4–14
Fine-Grained Flash Access ............................................................................................................ 4–15
Using DMA Devices ............................................................................................................................ 4–18
DMA Transmit Channels .............................................................................................................. 4–19
DMA Receive Channels ................................................................................................................. 4–20
Memory-to-Memory DMA Transactions .................................................................................... 4–21
Reducing Code Footprint ................................................................................................................... 4–23
Enable Compiler Optimizations ...................................................................................................4–23
Use Small Footprint Device Drivers ............................................................................................ 4–23
Reduce the File Descriptor Pool ................................................................................................... 4–24
Use /dev/null ................................................................................................................................. 4–24
Use UNIX not ANSI C File I/O ....................................................................................................4–24
Use the Small Newlib C Library ..................................................................................................4–25
Eliminate Unused Device Drivers ............................................................................................... 4–27
Use _exit() for No Clean Exit ........................................................................................................ 4–27
Disable Instruction Emulation ...................................................................................................... 4–27
Boot Sequence and Entry Point ......................................................................................................... 4–28
Hosted vs. Free-Standing Applications ...................................................................................... 4–28
Boot Sequence for HAL-Based Programs ................................................................................... 4–29
.4–30
Customizing the Boot Sequence ..................................................................................................
------ 以下略 ------