Altera Home Page
Literature Licensing
Buy On-Line Download

  Home   |   Products   |   Support   |   End Markets   |   Technology Center   |   Education & Events   |   Corporate   |   Buy On-Line  
  Devices   |   Design Software   |   Intellectual Property   |   Design Services   |   Dev. Kits/Cables   |   Literature  

 IP Products
   Embedded Processors
       Nios II
            Processor Cores
            Benefits
            Software Tools
                    Nios II IDE
                    Nios II C2H Compiler
                    Software
               Development Kits
               End Markets
               Customer Successes
               Literature
          Nios
          32/16-Bit Microprocessors
          8/4-Bit Microprocessors
          Literature
   Interfaces & Peripherals
   DSP
   Communications
  
 About IP
      Designing with IP
      Evaluate and Download IP
      IP Certifications
      System Design
      Request IP
  
 IP Industry Partners
      About AMPP Program
      AMPP Core Partners
  

Software Development Tools for the Nios II Processor

Software Development Tools

Software development tools are one of the most important factors when choosing a processor. With the Nios® II processor, you can use the robust Nios II Integrated Development Environment (IDE) along with tools that are available from Altera's software partners.

Nios II Integrated Development Environment

The Nios II IDE is the primary software development tool for the Nios II family of embedded processors. You can accomplish all software development tasks within the Nios II IDE, including editing, building, and debugging programs. The Nios II IDE provides a consistent development platform that works for all Nios II processor systems. With a PC, an Altera® FPGA, and a JTAG download cable, you have everything needed to write programs for, and communicate with, any Nios II processor system.

The Nios II IDE provides the main functions for software development:

The Nios II IDE is based on the open, extensible Eclipse IDE project and the Eclipse C/C++ Development Tools (CDT) Project. Learn more about the Eclipse Project at www.eclipse.org.

The Nios II IDE is part of the Nios II Embedded Design Suite (EDS). Download the Nios II Embedded Design Suite.

Project Manager

The Nios II IDE provides several project management features that speed up the development of embedded applications.

The new project wizard (see Figure 1) automates the setup of the C/C++ application project and system library projects. With the new project wizard, setting up new projects within the Nios II IDE is a snap.

Figure 1. Nios II IDE New Project Wizard

Figure 1. Nios II IDE New Project Wizard
View Full Size

In addition to the new project wizard, the Nios II IDE provides software code examples (in the form of project templates) to help you bring up working systems as quickly as possible.

Each template is a collection of software files and project settings. You can add your own source code to the project by placing the code in the project directory or importing the files into the project. Figure 1 shows some of the available software project templates.

Editor and Compiler

Altera's Nios II IDE provides a full-featured source editor and C/C++ compiler. The Nios II IDE text editor is a mature, full-featured source editor. Features include:

  • Syntax highlighting—C/C++
  • Code assist/code completion
  • Comprehensive search facilities
  • File management
  • Extensive online help topics and tutorials
  • Import assistance
  • Quick fix, auto-corrections
  • Integrated debugging features

Figure 2 shows a screen capture of the Nios II IDE text editor highlighting C source code.

Figure 2. Basic Editing Provided by the Nios II IDE

Figure 2. Basic Editing Provided by the Nios II IDE
View Full Size

The Nios II IDE provides a GUI to the GCC compiler based on the industry-standard GNU tool chain. The Nios II IDE build environment is designed to facilitate software development for Altera's Nios II processors, providing an easy-to-use push-button flow, while also allowing you to manipulate advanced build settings.

The Nios II IDE build environment automatically produces a makefile based on your specific system configuration. Changes made in the Nios II IDE compiler/linker settings are automatically reflected in this auto-generated makefile. These settings can include options for the generation of memory initialization files (MIF), flash content, simulator initialization files (DAT/HEX), and profile summary files.

More information on the Nios II IDE C/C++ compiler and build environment is available in the Nios II Software Developer's Handbook, Altera-Provided Development Tools (PDF) and the Nios II IDE online help.

Debugger

The Nios II IDE contains a robust software debugger based on the GNU debugger, GDB. The debugger provides many basic debug features, as well as several advanced debug features not usually available with low-cost processor development kits.

The Nios II IDE debugger contains basic debug features such as:

  • Run control
  • Call stack view
  • Software breakpoints
  • Disassembly code view
  • Debug information view
  • Instruction set simulator (ISS) target

Figure 3 shows a screen capture of a software breakpoint in the Nios II IDE debugger.

Figure 3. Nios II IDE Debugger Breakpoints

Figure 3. Nios II IDE Debugger Breakpoints
View Full Size

In addition to the basic debug features outlined above, the Nios II IDE debugger also has several advanced debugging capabilities, such as:

  • Hardware breakpoints for debugging code in ROM or flash
  • Data triggers
  • Instruction trace

The Nios II IDE debugger connects to the target hardware using a JTAG debug module. Additionally, support for off-chip trace is provided to work with third-party trace probes such as the in-target system analyzer for the Nios II processor (ISA-NIOS) from FS2.

The debug information view provides you with access to local variables, registers, memory, breakpoints, and expression evaluation functions.

Figure 4 shows an example of the debug information view, showing the register display of an example application.

Figure 4. Debug Information View—Register Display

Figure 5. Debug Information View - Register Display

The Nios II IDE debugger can connect to several target types. Table 1 shows the available target connections within the Nios II IDE debugger.

Table 1. Nios II IDE Debugger Targets 
Target Description
Hardware (via JTAG) Connect to an Altera FPGA development board, such as those available in a Nios II development kit or other Altera or partner kits.
Instruction Set Simulator Software implementation of the Nios II instruction set architecture. Used for system development before a hardware platform (such as an FPGA circuit board) is available.
Hardware Logic Simulator Connection to ModelSim® HDL simulator. Useful for systems with user-created peripherals that need to be verified.

C-to-Hardware Acceleration

The Nios II IDE now includes a plug-in for the Nios II C-to-Hardware (C2H) Acceleration Compiler, a productivity tool for embedded designers using Altera's popular Nios II embedded processor.

With the Nios II C2H Compiler you can:

  • Right-click to accelerate Nios II embedded software—without increasing clock frequency
  • Design using the standard ANSI C programming language
  • Develop with the familiar Eclipse-based Nios II IDE

Figure 5 shows a screen capture of the Nios II C2H Compiler.

Figure 5. Nios II C2H Compiler

Figure 6. Nios II C2H Compiler
View Full Size

Using the Nios II C2H Compiler is easy. Those familiar with the Nios II IDE will find the Nios II C2H Compiler design flow simple and intuitive. You can quickly replace performance-critical software routines with fast hardware accelerators in the FPGA, all with just a right-click of the mouse. The tool allows quick and efficient design space exploration to optimize application algorithms and to boost the performance over a software-only implementation. With the Nios II C2H Compiler, you can meet design performance requirements and ship products sooner. Learn more about the Nios II C2H Compiler.

Nios II IDE users can evaluate the Nios II C2H Compiler for free by downloading the latest version of the Nios II EDS. Contact your local Altera representative for purchasing and licensing information.

Flash Programmer

Many designs that utilize Nios II processors also incorporate flash memory on the board as a way to store an FPGA configuration and/or Nios II program data. The Nios II IDE includes a convenient method of programming this flash. You can program any common flash interface (CFI)-compliant flash device connected to the FPGA using the Nios II IDE flash programmer. In addition to CFI flash, the Nios II IDE flash programmer can program any Altera serial configuration device connected to the FPGA.

The flash programmer manages several types of data (see Table 2).

Table 2. Content Types Commonly Programmed Into Flash
Type of Content Description
System Firmware Programming software into flash allows the Nios II processor to boot from flash upon reset.
FPGA Configuration If using a configuration controller (such as that used on Nios development boards), the FPGA can be configured from flash upon power-on reset.
Arbitrary Binary Data Can be any type of binary data that you wish to store into flash, such as graphics, audio, etc.

The Nios II IDE flash programmer features an easy-to-use interface (shown in Figure 6).

Figure 6. Flash Programmer Interface

Figure 7. Flash Programmer Interface
View Full Size

The Nios II IDE flash programmer is pre-configured to work with all of the boards available with the Nios II development kits, but can be easily ported to any custom hardware. See the Nios II Flash Programmer User Guide for more information.

Nios II Software Build Tools

The Nios II software build tools allow you to create, modify, and build Nios II programs entirely from a command line or script (see Figure 7). The types of projects supported include C/C++ application projects, library projects, and board support package (BSP) projects. See the Nios II Software Build Tools (PDF) chapter of the Nios II Software Developer's Handbook for more information.

Figure 7. Nios II Software Build Tools

Figure 8. Nios II Software Build Tools

Partner Tools

Altera and its embedded software partners provide the compiler and debugger solutions shown in Tables 3 and 4.

Table 3 shows the compilers available for the Nios II processor.

Table 3. Compilers
Company  Product  Description
Altera GCC compiler (1) Standard GNU compiler for the Nios II processor.
Altium TASKING VX-toolset Optimizing C compiler, assembler, linker, and locator. Supports
Eclipse-based Nios II IDE with plug-in.

Note:

  1. Included with the Nios II Embedded Design Suite.

Table 4 shows the debuggers available for the Nios II processor.

Table 4. IDE/Debuggers
Company Product Supported Debug Cable
Altera FS2 Lauterbach
ByteBlasterTM II USB-
BlasterTM (1)
ISA-
NIOSII
ISA-
NIOSII/T
Power
Debug
Power
Trace
Altera Nios II IDE (1) Check Mark Check Mark Check Mark Check Mark - -
First Silicon Solutions (FS2) Nios II IDE Enhancements Check Mark Check Mark Check Mark Check Mark - -
Lauterbach TRACE32-PowerView - - - - Check Mark Check Mark
Mentor Graphics®   Check Mark Check Mark Check Mark - - -

Note:

  1. Included with the Nios II Embedded Design Suite.

  Please Give Us Feedback