Nios II IDE Help System 101 Innovation Drive San Jose, CA 95134 www.altera.com UG-N2IDEHELP-1.7 Nios II IDE Version: Document Version: Document Date: 9.0 1.
Table Of Contents About This Document................................................................................................... 1 Welcome to the Nios II IDE........................................................................................... 3 What's New in the Nios II IDE ....................................................................................... 7 Tutorials ..................................................................................................................
Table Of Contents Profiling C Code...................................................................................................... 73 Storing Firmware on the Target Board .......................................................................... 75 About Storing Firmware ........................................................................................... 75 Programming Flash .................................................................................................
Nios II IDE Help System C/C++ Build Page (Properties Dialog Box) ............................................................. 115 C/C++ Documentation Page (Properties Dialog Box) ............................................... 118 Properties Dialog Box ......................................................................................... 119 Project References Page (Properties Dialog Box)..................................................... 121 System Library Page (Properties Dialog Box)................
About This Document This document provides complete reference for the Nios II integrated development environment (IDE), including details of the Nios II embedded design suite (EDS) design flows and tutorials on using the IDE. This document is based on the HTML content of the Nios II IDE help system. Altera provides this content as a PDF file to make it accessible as a stand-alone document outside of the Nios II IDE. The content for this document was developed as an interactive help system.
Nios II IDE Help System Altera 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 Altera Corporation in the U.S. and other countries. All other product or service names are the property of their respective holders. Altera products are protected under numerous U.S. and foreign patents and pending applications, maskwork rights, and copyrights.
Welcome to the Nios II IDE The Nios II integrated development environment (IDE) is a graphical software development tool for the Nios II family of embedded processors. The Nios II IDE provides a consistent development platform that works for all Nios II processor systems. You can accomplish all software development tasks within the Nios II IDE, including editing, building, debugging, and profiling programs.
Nios II IDE Help System Note:The two design flows are not interchangeable. Once you have committed to using one design flow, there is no way to switch to using the other design flow. Getting Started with the IDE: Refer to the following help topics and cheat sheets to help you start using the Nios II IDE quickly. Quick-Start Tutorial This cheat sheet guides you through the process of creating, compiling, and running a new project on a Nios development board.
Welcome to the Nios II IDE need to create, build, run, and debug within the Nios II IDE. You can do C/C++ source code and file searches on your projects by creating a project index. The Nios II IDE stores your projects in a directory called a workspace. You can define one or more workspaces, as well as select the workspace to use for the current IDE session using the Workspace Launcher dialog box. Customizing Nios II IDE Preferences: The Nios II IDE provides preferences to customize the IDE.
Nios II IDE Help System Related Eclipse and CDT Help Topics Workbench User Guide > Concepts > Help C/C++ Development User Guide > Concepts > Perspectives available to C/C++ developers Workbench User Guide > Tasks > Working with perspectives Workbench User Guide > Reference > Preferences C/C++ Development User Guide > Reference > C/C++ preferences Related Topics on the Web Nios II literature web page at www.altera.com/literature/lit-nio2.jsp—Contains all documentation related to the Nios II processor.
What's New in the Nios II IDE Note: No significant enhancements have been made to the Nios II Integrated Development Environment v8.0 release. Refer to the Nios II Embedded Design Suite Release Notes and Errata for a list of addressed errata. For information about converting your IDE projects to Nios II software build tools projects, refer to the Porting IDE Projects to the Software Build Tools Flow appendix of the Nios II Software Developer's Handbook. What's New in the Nios II IDE v8.
Nios II IDE Help System Feature Description Centralized links to alteraprovided components The Nios II EDS version 7.2 has only one link in the workspace to the source code for altera-provided device drivers and software packages. The redundant links formerly referenced from within each separate system library project are now consolidated into one altera.components project, available in the Nios II C/C++ Projects view after creating or building a project that references the shared source code.
What's New in the Nios II IDE Two design flows The Nios II embedded design suite (EDS) version 7.1 offers two design flows involving the Nios II IDE. You can work entirely within the IDE, or you can work with the new Nios II software build tools in the Nios II command shell and then import your work into the IDE for debugging. The two design flows are not interchangeable. Once you have committed to using one design flow, there is no way to switch to using the other design flow.
Tutorials About Tutorials The Nios II IDE provides tutorials so beginning Nios II developers can become familiar with the development environment, user interface, and software development process. The following sections describe tutorials available in the Nios II IDE. The Altera website also provides tutorials that Nios II developers might find useful. Quick-Start Tutorial: This tutorial guides you through the process of creating a new project, compiling it, and running it on a Nios development board.
Tutorials Creating a Nios II C/C++ Application Project A Nios II C/C++ application project contains your program code and corresponding build settings. In this tutorial you create a Nios II C/C++ application project for the full featured hardware design provided in the Nios II Embedded Design Suite (EDS). The example C program exercises the visible output devices on a Nios development board, such as the LEDs and LCD screen.
Nios II IDE Help System Note: Each template is a collection of software files and project settings that serve as a base for the new project. The Nios II IDE automatically copies the source files into the new project's directory. You can add your own source code to the project later. 8. Click Finish to exit the wizard. The New Project wizard closes, and you return to the Nios II IDE workbench.
Tutorials Building the Project Building a project in the Nios II IDE compiles and links all the source code associated with the project and the system library project. The result of building is an executable file (.elf) that you can run or debug. Use the following methods to build the project: Right-click on the project in the Nios II C/C++ Projects view, and click Build Project. Note: Make sure you build the application project tutorial, not the system library tutorial_syslib.
Nios II IDE Help System Running the Project Running a project in the Nios II IDE executes the project code so you can analyze the output. You can run a project on these different targets using the Nios II IDE: Nios II hardware Nios II instruction set simulator (ISS) ModelSim hardware simulator This tutorial discusses running on a Nios development board (i.e., a Nios II hardware target) and on the ISS. Running has the following basic steps.
Tutorials Note: If Start is not enabled, click Hardware Setup to configure your Altera download cable. 8. Close or minimize the Quartus II Programmer and return to the Nios II IDE. Note: If you are targeting a board other than the Nios development board, you need to configure the Quartus II programmer differently, as specified by the board designer. You can save the Quartus II configuration settings to a chain descriptor file (.
Nios II IDE Help System 3. Establishes communication with the target board, and verifies that the expected SOPC Builder system is configured in the FPGA. If the FPGA is not configured properly, you should repeat the steps to configure the hardware. 4. Downloads the executable file (.elf) to memory on the target board. 5. Instructs the Nios II processor to begin executing the code. After using the Run As command once, to run again click Run on the toolbar.
Tutorials Debugging the Project The Nios II IDE contains an integrated debugger that allows you to debug your program on Nios II hardware or on the instruction set simulator (ISS) . This topic introduces the main features of the debugger. The tutorial assumes you are working with a Nios II hardware target. The process is the same for debugging on the ISS, with the exception of steps that involve the target hardware.
Nios II IDE Help System Notice that the perspective of the Nios II IDE changed from the Nios II C/C++ development perspective to the Debug perspective. A perspective is a different configuration of the Nios II IDE workbench. Refer to Related Topics for more information about perspectives. You can switch between perspectives anytime by pointing to Open Perspective on the Window menu or by clicking on the shortcut buttons near the upperright of the Nios II IDE window.
Tutorials Refer to Related Topics for more information about the Debug view. If you accidentally terminate the debug session, or the download cable connection is interrupted, you can easily start a new debugging session by clicking toolbar. Debug on the To step through the C/C++ code line by line: Click Step Into. If executing a line of code that calls a function, the debugger steps into the function. Otherwise it executes the line of code and suspends on the next line in the current function.
Nios II IDE Help System Note: You must click in the margin to the left of the line of code. Clicking within the editor does not affect breakpoints. 7. Click Resume in the Debug view. The processor resumes and then suspends just before executing the line of code with the breakpoint. The editor displays an arrow in the margin next to the suspended line of code. It might take a moment for the program to execute to the breakpoint. Resume again to iterate through the loop another time.
Tutorials Click Instruction Stepping Mode in the Debug view toolbar to allow single stepping through the individual assembly instructions. Stepping through assembly code advances the instruction pointer in the Disassembly view. Because multiple assembly instructions represent a single line of C/C++ code, the instruction pointer might not advance in the C/C++ Editor view with each step through the assembly instructions.
Nios II IDE Help System You can also selectively display global variables, which are variables defined outside the scope of all functions, but are available from within any function. In the count_binary.c example, to track the global variable count in the Variables view, do the following: 1. If the processor is running, click Thread [0] (Running) in the Debug view, and click 2. Suspend. Right-click in the Variables view and then click click Add Global Variables...
Tutorials 2. Highlight the expression count == 0xff in the code. 3. Add Watch Expression.... The Add Watch Right-click and then click Expression dialog box appears with the Expression to watch box automatically filled in with the selected text: count==0xff. 4. Change Expression to watch to count==5. 5. Click OK. The expression the upper-right window. appears in the Expressions view in Now, every time execution suspends at a breakpoint, the Expressions view evaluates the expression count==5.
Nios II IDE Help System Click the Memory tab in the upper-right pane of the Debug perspective to display the Memory view. You can also point to Show View on the Window menu, and then click Memory. This view displays the contents of memory. The Memory view allows you to track multiple locations in memory without having to continually type in addresses by hand. You can track constants and expressions, which allows you to search for a memory location by symbolic name.
Tutorials memory C/C++ Development User Guide > Tasks > Running and Debugging > Working with registers C/C++ Development User Guide > Tasks > Running and Debugging > Working with variables Workbench User Guide > Tasks > Working with perspectives 25
Nios II IDE Help System Editing the Project Properties A project's Properties dialog box controls how the program interacts with the system hardware and how the Nios II IDE builds the application. Settings available vary for each project type. Due to the way the Nios II IDE separates and associates Nios II C/C++ application projects and Nios II system library projects, settings in a Nios II system library project can significantly impact the Nios II C/C++ application project.
Tutorials Info: (tutorial_project.elf) 78 KBytes program size (code + initialized data). Note: The program size you see might differ depending on your target SOPC Builder system. Next, change the system library settings to reduce code size. Perform the following steps: 1. Right-click the tutorial project in the Nios II C/C++ Project view, and click System Library Properties. The Properties dialog box appears. 2. Click System Library in the left-hand pane. The System Library page appears. 3.
Nios II IDE Help System Related Topics on the Web Nios II Software Developer's Handbook at www.altera.com/literature/hb/nios2/n2sw_nii5v2.pdf—Contains details on writing programs for the Nios II processor.
Creating Projects About Nios II IDE Projects An individual Nios II IDE project is a group of files treated as a unit, containing source code, makefiles, binaries, and other related files. The Nios II IDE provides the following project types. A typical executable program consists of two or more individual projects working in conjunction. The most common combination is a Nios II C/C++ application project that depends on a Nios II system library project.
Nios II IDE Help System A Nios II C/C++ library project can contain reusable, general purpose functions that multiple Nios II C/C++ application projects can share. A library containing common arithmetical functions is one example. Building a Nios II C/C++ library project results in a .a library file. The Nios II IDE manages these library projects for you. Nios II C/C++ library projects typically do not have dependencies on a Nios II system library project.
Creating Projects About the Nios II IDE Managed-Make Build Environment This topic describes the Nios II IDE build environment for building programs based on the Nios II hardware abstraction layer (HAL) system library. If you are a typical user, the Nios II IDE completely manages the build environment for you, relieving you of the need to understand the inner workings of this managed-make environment. Internally, the Nios II IDE uses a standard GNU GCC compiler tool chain to compile projects.
Nios II IDE Help System .stf file—The .stf file describes a project's software configuration, and is generated by the Nios II IDE. For application projects, application.stf identifies the project's associated system library. For system libraries, system.stf contains the information captured through the System Library properties page in the IDE. .cdtbuild file—The .cdtbuild file describes a project’s tool chain options, and is generated by the Nios II IDE. The .
Creating Projects Figure 2.
Nios II IDE Help System The following section describes the function of each of these included files. For detailed implementation details, refer to the individual file concerned. makefile Both application and system projects contain at their top level a makefile generated by the Nios II IDE. This makefile is stored within the project. This file contains the information supplied through the IDE in the form of make variables.
Creating Projects lists of components being used, which are combined here to form the COMPONENTS variable. COMPONENTS is then used to construct: the include search path, and a list of the makefile fragments supplied by the various components. These are then used by app_rules.mk. system.mk This file is included into the top level makefile for system library projects, and is supplied in the build directory of the altera_hal component.
Nios II IDE Help System This file is located in the build directory of the altera_hal component. generated_app.mk The file generated_app.mk is generated from the contents of the SOPC Builder system and .stf files, and is stored in the system library project. The rule used to generate generated_app.mk is defined in gtf_rules.mk. This file defines all of the rules that are to be run as a part of the build process after the .elf file has been created, for example the rules to build flash programming files.
Creating Projects Creating a New Project To create a new project in the Nios II IDE: 1. On the File menu, point to New, and then click Project.... The New Project wizard appears and presents a list of all project types available. 2. Expand Altera Nios II in the Wizards list. A list of the Nios II project types appears. 3. Click the desired project type. 4. Click Next. Each of the types of projects has a different set of wizard pages.
Nios II IDE Help System the new project, use the Blank Project template. You must manually insert at least one C file before building the project. 6. If you want the Nios II IDE to create a default associated system library for you, skip to step 9. 7. Click Next. The next page of the wizard appears, showing options for an associated Nios II system library project. 8. Specify how you want to associate the Nios II C/C++ application project to a Nios II system library by doing one of the following.
Creating Projects 4. Select a specific processor for the project in the CPU list. If your SOPC Builder system has only one processor, the Nios II IDE sets CPU automatically. 5. Select an RTOS in the Type of RTOS list. 6. Click Finish. The Nios II IDE creates a new directory for your Nios II system library project, and adds your project to the list of available projects in the Nios II C/C++ Projects view.
Nios II IDE Help System New New New New New Nios II C/C++ Application (New Project Wizard) Nios II System Library (New Project Wizard) Nios II User-Makefile C/C++ Application (New Project Wizard) Nios II C/C++ Library (New Project Wizard) Projects Page (Preferences Dialog) Related Eclipse and CDT Help Topics C/C++ Development User Guide > Getting Started > CDT Standard Make Tutorial Related Topics on the Web Nios II literature web page 40
Creating Projects Importing, Exporting, and Sharing Projects and Files The Nios II IDE allows you to import and export existing Nios II IDE projects, folders, and files. Importing and exporting IDE projects allows you to archive projects and share projects with other designers. Importing files allows you to associate files on your hard drive with a Nios II IDE project. You can also import projects created from the command line. To import Nios II IDE projects: 1.
Nios II IDE Help System Use an external file management tool (such as Windows Explorer) to "drag and drop" files and folders onto the project folder in the Nios II C/C++ Projects view of the Nios II IDE. The Nios II IDE automatically recognizes C files and folders in the project folder and associates them with the project. After copying, you might have to right-click the project in the Nios II C/C++ Projects view, and then click Refresh for the Nios II IDE to recognize the files.
Creating Projects C/C++ application. See /examples/verilog/niosII_cycloneII_2c35/standard/software_exa mples/app/hello_world for an example. Nios II board support package (BSP). See /examples/verilog/niosII_cycloneII_2c35/standard/software_exa mples/bsp/hal_default for an example. supporting source code (such as the gnu tools library). path>/bin/nios2-gnutools for an example.
Nios II IDE Help System 44
Creating Projects Indexing and Searching Project Contents The Nios II IDE uses the C/C++ and file search capabilities of the Eclipse environment. Refer to the Related Topics for more information about C/C++ and file search capabilities. C/C++ searches (accessible from the Search menu) are based on the C/C++ search index. When you start the Nios II IDE, the IDE does not take the time to automatically create an index of your projects. You must manually start indexing for projects you need to search.
Configuring Projects About Project Properties Project properties control how the Nios II IDE builds a project and how programs interact with the system hardware at runtime. The Nios II IDE offers multiple project types, and project properties depend on the project type. For executable application projects, properties such as preprocessor and compiler settings determine how the project builds. For Nios II system library projects, properties affect how the application program interacts with the target.
Configuring Projects Configuring Project Properties Project properties control how the Nios II IDE builds the project and how the program interacts with the system hardware at runtime. To configure a project's properties: 1. Right-click on the project in the Nios II C/C++ Projects view, and click Properties. 2. Click the page titles in the left-hand pane to view and edit project properties, as described in the Properties dialog box topics.
Nios II IDE Help System Choosing and Configuring an Operating System By default, the Nios II IDE uses the hardware abstraction layer (HAL) single-threaded runtime environment. You can optionally include a real-time operating system (RTOS) as part of your Nios II system library project. Altera provides the MicroC/OS-II RTOS, and other vendors can provide their own OS as a plug-in. You add and configure OS options using the System Library page of the Properties dialog box.
Configuring Projects step instructions on creating MicroC/OS-II applications.
Nios II IDE Help System Choosing and Configuring Software Packages Software components are middleware software modules that the Nios II IDE recognizes and can automatically link into a software project. You add and configure software components using the System Library page of the Properties dialog box.
Configuring Projects Configuring Project Dependencies Projects in the Nios II IDE can be dependent on other Nios II IDE projects. Nios II C/C++ application projects inherently depend on a single Nios II system library project. Nios II C/C++ application projects and Nios II user-makefile C/C++ application projects can also depend on Nios II C/C++ library projects. Nios II C/C++ library projects can depend on other Nios II C/C++ library projects.
Nios II IDE Help System 2. 3. 4. 5. Reference the Nios II C/C++ library project from your Nios II C/C++ application project. This step ensures that your Nios II C/C++ library project builds before your Nios II C/C++ application project. It also ensures you can easily step into the C/C++ library code when debugging your application project. a. Click Project References in the left-hand pane. b. Turn on the Nios II C/C++ library project you want to reference.
Editing Code About Editing Code The C/C++ editor, part of the C/C++ Development Toolkit (CDT), provides specialized features for editing C/C++ files. The editor includes the following features: Syntax highlighting Code completion Code templates Code searching Normally, you use the C/C++ editor in the Nios II C/C++ perspective. It is also available in the C/C++ and Debug perspectives. You can invoke the C/C++ editor by opening a file from the Nios II C/C++ Projects view.
Building Projects About Building Projects Building a project in the Nios II IDE compiles and links all the source code associated with the project. Associated code can include other projects that your project depends on, such as a Nios II system library project associated with a Nios II C/C++ application project or a Nios II board support package (BSP) associated with a Nios II user-makefile C/C++ application project.
Building Projects Building a Project Building a project in the Nios II IDE compiles and links all the source code and libraries associated with the project. Associated code and libraries might exist in other projects that your project depends on. You can specify a single project to build or build all projects in your workspace. To build a project and update its dependencies: Right-click on the project in the Nios II C/C++ Projects view, and click Build Project.
Running and Debugging Projects About Running and Debugging Projects Running or debugging a project in the Nios II IDE executes the project code so you can analyze the output. Running a project consists of loading the executable code into the target environment, and then turning control over to the target environment for code execution.
Running and Debugging Projects Running on a Nios II ModelSim target allows you to execute code on a hardware simulation of a Nios II processor system. Hardware simulation allows you to simulate cycle-accurate behavior of a Nios II processor system. ModelSim is only available as a run target. You cannot interactively debug executable code using the ModelSim simulator. Running on a Nios II ModelSim target involves the following steps: 1.
Nios II IDE Help System Viewing Disassembly Viewing Execution Trace Related Eclipse and CDT Help Topics C/C++ Development User Guide > Tasks > Running and Debugging > Creating or editing a run/debug configuration—Describes creating run/debug configurations for default Eclipse (non-Nios II) targets.
Running and Debugging Projects Configuring the FPGA When targeting Nios II hardware, you must configure the FPGA on the target board with your project's associated SOPC Builder system. The factory-programmed SOPC Builder system (i.e. the FPGA hardware design) on targets like the Nios development boards is different than your project's SOPC Builder system. Therefore, your executable code does not run unless you configure the FPGA with the expected SOPC Builder system.
Nios II IDE Help System download cable. 6. Close or minimize the Quartus II Programmer and return to the Nios II IDE. Related Nios II IDE Help Topics About Running and Debugging Projects Running and Debugging on Hardware Related Topics on the Web Nios II Processor Reference Handbook at www.altera.com/literature/hb/nios2/n2cpu_nii5v1.pdf—Contains details on the JTAG debug module on the Nios II processor.
Running and Debugging Projects Running and Debugging on Hardware Running and debugging a Nios II project on a Nios II hardware target involves creating a run/debug configuration, and then starting the run or debug session. The Nios II IDE can automatically create a default configuration for you, or you can manually create a configuration. Note: Running or debugging on hardware requires that you first download an SRAM object file (.sof) to the target board to configure the FPGA.
Nios II IDE Help System Builds the project. If the project is not up-to-date, then the IDE builds it first to generate an up-to-date executable file. Establishes communication with the target board, and verifies that the expected SOPC Builder system is configured in the FPGA. If the FPGA is not configured properly, you should repeat the steps to configure the hardware. Downloads the executable file (.elf) to memory on the target board using the nios2download command line tool.
Running and Debugging Projects Running and Debugging on the ISS Using the Nios II IDE, the process to run or debug on the Nios II instruction set simulator (ISS) is nearly identical to running and debugging on a target hardware. You typically invoke the ISS as a run or debug target from the Nios II IDE. Alternatively, you can invoke nios2iss from a Nios II command shell, although Altera recommends command-line usage only to advanced users.
Nios II IDE Help System When you start a debug session, the Nios II IDE invokes the nios2-iss application. The Nios II ISS supports all GDB debug facilities, such as the ability to set breakpoints, set watchpoints, and view memory. Reading uninitialized memory or empty regions in the memory map returns zero. Depending on the run/debug configuration, the ISS can generate a warning or an error whenever a read occurs from uninitialized memory.
Running and Debugging Projects Running on the ModelSim Simulator Running on a Nios II ModelSim target allows you to execute code on a hardware simulation of a Nios II processor system. Hardware simulation allows you to simulate cycle-accurate behavior of a Nios II processor system. ModelSim is only available as a run target. You cannot interactively debug executable code using the ModelSim simulator.
Nios II IDE Help System Running and Debugging Multiprocessor Collections Multiprocessor collections provide an easy way to run or debug a group of Nios II C/C++ application projects on a Nios II hardware target as a unit. Running or debugging a multiprocessor collection allows you to download executable code for each project in the collection and start execution for all processors in a single command.
Running and Debugging Projects To terminate all processes simultaneously, select the multiprocessor collection process in the Debug view, and click Terminate. Note: A debug process for a multiprocessor collection remains active as long as any of the associated Nios II hardware target configuration processes are active. If one of the debug processes fails to start correctly or terminates early, the other processes will continue running.
Nios II IDE Help System Viewing Execution Trace The Nios II IDE provides methods to trace code execution for Nios II hardware and Nios II instruction set simulator (ISS) targets during debug sessions. Trace methods display a sequential list of the instructions executed prior to the processor suspending. When debugging a program on a Nios II hardware target, the Trace view in the Debug perspective displays the exact execution trace of the program running in hardware.
Running and Debugging Projects This line shows the executed instruction has the value 0xd839883a at program counter location 0x010002c8. The instruction moves the value in sp (0x1fffff0) to fp. When Instruction Count is on, the ISS counts each instruction executed, and displays the instruction count (such as [19]). To direct trace data for Nios II instruction set simulator targets to a file: The following steps require that you first create an ISS run/debug configuration for your project. 1.
Nios II IDE Help System Viewing Disassembly Viewing disassembly allows you to analyze the exact instruction-by-instruction execution during a debug session. You can use the Disassembly view to see mixed C/C++ and assembly source code, set breakpoints, and single step through your code. To open Disassembly view: To view disassembly, start a debug session. The Disassembly view displays in the Debug perspective automatically.
Running and Debugging Projects Nios II Processor Reference Handbook at www.altera.com/literature/hb/nios2/n2cpu_nii5v1.pdf—Contains details on the Nios II instruction set.
Profiling Execution Performance About Profiling with the Nios II IDE The GNU profiler (gprof) collects information about which functions call other functions during program execution, and tracks the time spent in each function. Profiling provides information about the efficiency of your program by showing you where and how your program spends its time. Profiling can help you determine where to optimize your code to improve execution performance.
Profiling Execution Performance Profiling C Code To use the GNU profiler, you must compile and link your program with the profiling library, execute the program to generate a gmon.out profile data file, and run gprof to parse the profile data. The following sections describe how to accomplish the tasks. To collect profiling data: 1. Switch to the Nios II C/C++ perspective, if necessary. 2. Right-click your project in the Nios II C/C++ Projects view, and then click System Library Properties. 3.
Nios II IDE Help System Samples —Function Total View (Profiling Perspective) Samples —Line By Line View (Profiling Perspective) Related Topics on the Web AN 391: Profiling Nios II Systems at www.altera.com/literature/an/an391.
Storing Firmware on the Target Board About Storing Firmware After you have successfully built and debugged an application, you might want to store the executable file (.elf) as firmware in your target hardware. You might store firmware in the target at the end of the development process when the firmware is ready to release to manufacturing. Alternatively, you might store firmware during the development process as part of a test procedure.
Nios II IDE Help System Programming Flash You can program flash memory with software files, SRAM object files (.sof), and data files. Programming flash memory enables your hardware to load software and configuration data at startup time. You can program flash memory connected to an FPGA using the Nios II IDE flash programmer. You manage programming flash memory using flash programmer configurations.
Storing Firmware on the Target Board Note: In order for the flash programmer to program any SRAM object file or data file, you must specify target hardware, even if you are not programming an executable file into flash memory. The flash programmer uses the target hardware settings to determine the available flash memories and FPGA configuration locations. 5. 6. If you have an FPGA configuration to program into flash memory, use the following steps: a.
Nios II IDE Help System click Preferences, then expand Run/Debug, click Launching, and turn off Build (if required) before launching. The flash programmer automatically appends boot-loader code to the front of the configuration data if it is needed. Related Nios II IDE Help Topics About Storing Firmware Flash Programmer Dialog Box Related Topics on the Web Nios II Flash Programmer User Guide at www.altera.com/literature/ug/ug_nios2_flash_programmer.
Features and Terms Reference Advanced Debugging Features by FS2 The FS2 console from First Silicon Solutions, Inc. (FS2) provides additional advanced debugging features for Windows users. During a debug session, the Nios II IDE automatically launches the FS2 console when the Use FS2 console window for trace and watchpoint support option is on in the Debugger tab. This feature is not available on Linux. Related Topics on the Web First Silicon Solutions, Inc. at www.fs2.
Nios II IDE Help System C-to-Hardware Acceleration (C2H) Compiler The Nios II C-to-Hardware Acceleration (C2H) Compiler is a tool that allows you to create custom hardware accelerators directly from ANSI C source code. A hardware accelerator is a block of logic that implements a C function in hardware, which often improves the execution performance by an order of magnitude.
Features and Terms Reference Hardware Abstraction Layer (HAL) The Nios II hardware abstraction layer (HAL) runtime library is a lightweight runtime environment that provides a simple device driver interface for programs to communicate with the underlying hardware. The HAL application program interface (API) is integrated with the ANSI C standard library. The HAL API allows you to access devices and files using familiar C library functions, such as printf(), fopen(), fwrite(), etc.
Nios II IDE Help System Hardware Simulation with ModelSim The Nios II development environment is integrated with the ModelSim hardware simulator, which allows the Nios II IDE to launch programs on a hardware simulation of a Nios II processor system. Hardware simulation allows you to simulate cycle-accurate behavior of a Nios II processor system.
Features and Terms Reference Hardware Target A Nios II hardware target is a printed circuit board (PCB) with an Altera FPGA containing a Nios II system. Altera and other companies provide a number of Nios II hardware targets in the form of development boards. Many other companies develop their own proprietary hardware targets. Related Nios II IDE Help Topics About Running and Debugging Projects Running and Debugging on Hardware Related Topics on the Web Nios II home page at www.altera.
Nios II IDE Help System Host-Based File System The host-based file system enables programs executing on a target board to read and write files stored on the host computer. The Nios II IDE transmits file data over the Altera download cable. Your program accesses the host based file system using the ANSI C standard library I/O functions, such as fopen() and fread(). The host-based file system is a software component which you add to your system library.
Features and Terms Reference { fprintf(stdout, "%s", buffer); } fclose(hostfile); printf("That's all folks\n"); return 0; } Related Nios II IDE Help Topics Choosing and Configuring Software Packages Software Components Dialog Box (System Library Properties Page) Related Topics on the Web Nios II literature web page 85
Nios II IDE Help System Instruction Set Simulator (ISS) The Nios II instruction set simulator (ISS) allows you to execute and debug Nios II programs in simulation on a host PC. The ISS simulates software executing on a Nios II processor core connected to a limited set of peripherals. The simulation is at the functional level, and all operations complete in one cycle. It is not a cycle-accurate simulation, and therefore performance benchmarking on the ISS gives optimistic results.
Features and Terms Reference The ISS does not support reading or writing tightly coupled memories connected to the Nios II processor. The ISS does not support custom instructions. The ISS models the Nios II ienable register as a complete 32-bit register. In hardware (both on a target board and in HDL simulation), all bits associated with unused interrupt inputs are always zero. The EPCS Serial Flash Controller core only supports boot-from-flash behavior.
Nios II IDE Help System MicroC/OS-II RTOS MicroC/OS-II is a real-time, multitasking kernel for microprocessors and microcontrollers. Altera provides the MicroC/OS-II real-time operating system (RTOS) as part of the Nios II Embedded Design Suite. The Nios II IDE makes it easy to base your Nios II C/C++ application project on MicroC/OS-II. When enabled, the MicroC/OS-II real-time kernel is part of the Nios II system library. Note: You can evaluate MicroC/OS-II at no charge using a Nios development board.
Features and Terms Reference Multiprocessor Nios II Systems The Nios II IDE is capable of running and debugging multiple Nios II processors simultaneously. Altera hardware development tools automatically connect the JTAG debug circuitry to the Nios II processor(s). Regardless of where the Nios II processor(s) reside in the JTAG chain, the Nios II IDE can connect to each processor, download code, and run and debug.
Nios II IDE Help System NicheStack TCP/IP Stack - Nios II Edition The NicheStack® TCP/IP Stack - Nios II Edition is an implementation of the transmission control protocol/internet protocol (TCP/IP) suite. Altera provides the NicheStack TCP/IP Stack as a software component plug-in for the Nios II IDE, which you add to your Nios II system library. Your program code can use the sockets API to send data over Ethernet hardware.
Features and Terms Reference Software Components Dialog Box (System Library Properties Page) Choosing and Configuring an Operating System MicroC/OS-II RTOS Related Topics on the Web Nios II literature web page 91
Nios II IDE Help System Run/Debug Configuration A run/debug configuration is an IDE-managed file that stores the settings necessary to run or debug a specific project on a specific target. The available target types are Nios II hardware, Nios II instruction set simulator (ISS), Nios II ModelSim, and Nios II multiprocessor collection. Configurations are categorized by target type and contain settings specific to the target type.
Features and Terms Reference Valid Project Names Nios II IDE project names must be unique and conform to the following rules: Alphabetic characters, numeric characters, and the underscore symbol are the only valid project name characters. Project names cannot contain spaces or special characters, such as \, +, =. The first character in the project name must be alphabetic or the underscore symbol. The minimum filename length is one character. The maximum filename length is 250 characters.
Nios II IDE Help System Zip Read-Only File System The zip read-only file system provides access to a simple file system stored in flash memory. Your program accesses the Zip file system using the ANSI C standard library I/O functions, such as fopen() and fread(). The zip read-only file system is a software component which you add to your system library. The zip read-only file system requires an uncompressed .zip file that contains all of the files for the zip file system.
GUI Reference Flash Programmer Dialog Box You open this dialog box by clicking Flash Programmer on the Tools menu. The Flash Programmer dialog box allows you to program data to flash memory with the flash programmer. The flash programmer uses a flash programmer configuration, which contains all the parameters that affect the flash programming process. The Flash Programmer dialog box includes controls to create flash programmer configurations and set up all the parameters they contain.
Nios II IDE Help System Additional nios2-flash-programmer arguments—Specifies additional command line arguments. For a complete list of arguments, type nios2-flash-programmer --help on a command line. Load JDI File—Specifies which JTAG device to download the .elf file to, in hardware designs containing multiple processors or multiple SOPC Builder systems. Loading the JDI file ensures that the Additional nios2-flash-programmer arguments contain the correct JTAG instance ID.
GUI Reference JTAG device—Specifies the device on the selected JTAG chain. Refresh—Updates the list if you change your JTAG devices while in the Flash Programmer dialog box. The Target Connection tab specifies the download cable and device for the selected configuration. The Target Connection tab contains the following settings. o JTAG cable—Specifies the Altera download cable (such as the USB Blaster) to use for communicating with the Nios II processor.
Nios II IDE Help System Import Wizard You open this wizard by clicking Import... on the File menu. You use the Import wizard to import an existing project that you created in a different IDE workspace. The first page of the Import wizard presents a list of all import sources available. The only one of concern to Nios II IDE users is Existing Altera Nios II Project into Workspace in the Altera folder. This import source allows you to browse your hard drive for existing projects to import.
GUI Reference New Project Wizard New Project Wizard You open this wizard by pointing to New on the File menu, and then clicking Project. The New Project wizard guides you through the process of creating a new project. The wizard consists of several pages that present an ordered sequence of actions to create a project. The first page of the New Project wizard presents a list of all project types available. Project types specific to the Nios II processor are under the Altera Nios II category.
Nios II IDE Help System New Nios II C/C++ Application (New Project Wizard) You open this wizard page by expanding Altera Nios II in the New Project wizard, clicking Nios II C/C++ Application, and then clicking Next. The Nios II C/C++ Application pages of the New Project wizard allow you to create a new Nios II C/C++ application project and an associated Nios II system library project. The first page allows you to specify settings for the Nios II C/C++ application project.
GUI Reference Creating a New Project New Project Wizard Related Topics on the Web Nios II literature web page 101
Nios II IDE Help System New Nios II System Library (New Project Wizard) You open this wizard page by expanding Altera Nios II in the New Project wizard, clicking System Library, and then clicking Next. The System Library page of the New Project wizard allows you to create a new system library for an SOPC Builder system. The System Library page contains the following controls. Name—Specifies a valid project name for the new project.
GUI Reference New Nios II C/C++ Library (New Project Wizard) You open this wizard page by expanding Altera Nios II in the New Project wizard, clicking Nios II C/C++ Library Project, and then clicking Next. The Nios II C/C++ Library Project page of the New Project wizard allows you to create a new Nios II C/C++ library project for developing C/C++ libraries. Nios II C/C++ library projects typically contain independent utility functions, and do not have dependencies on a Nios II system library project.
Nios II IDE Help System New Nios II User-Makefile C/C++ Application (New Project Wizard) You open this wizard page by expanding Altera Nios II in the New Project wizard, clicking Nios II User-Makefile C/C++ Application, and then clicking Next. The Nios II User-Makefile C/C++ Application page of the New Project wizard allows you to create Nios II user-makefile C/C++ applications. Nios II user-makefile C/C++ applications are projects that do not manage the project makefiles for you.
GUI Reference Nios II C/C++ Perspective Nios II C/C++ Perspective You open this perspective by pointing to Open Perspective on the Window menu, and then either clicking Nios II C/C++, or clicking Other... and then double-clicking Nios II C/C++. The Nios II C/C++ perspective tailors the Eclipse C/C++ Development Toolkit (CDT) for Nios II developers. It is the primary perspective for Nios II software development.
Nios II IDE Help System Preferences Dialog Box Preferences Dialog Box You open this dialog box by clicking Preferences on the Window menu. The Preferences dialog box allows you to customize the look, feel, and behavior of the Nios II IDE workbench. Certain preference pages are specific to the Nios II IDE. Nios II IDE preferences pages affect how the Nios II IDE builds, stores, runs, and debugs projects. Other preference pages are part of the standard Eclipse environment.
GUI Reference Nios II Page (Preferences Dialog Box) You open this page by clicking Preferences on the Window menu, and then clicking Nios II in the left-hand pane. The Nios II preferences page contains settings that affect how the Nios II IDE builds and runs projects. The settings are common for all projects. The Nios II preferences page contains the following settings. Show command lines when running 'make' (i.e.
Nios II IDE Help System New Projects Page (Preferences Dialog Box) You open this page by clicking Preferences on the Window menu, expanding Nios II in the left-hand pane, and then clicking New Projects. The Nios II New Projects preferences page contains settings that specify the default location where the Nios II IDE saves new projects. The settings on this page affect only the default choice for new project location; the New Project wizard can override this location later.
GUI Reference Trace Page (Preferences Dialog Box) You open this page by clicking Preferences on the Window menu, expanding Run/Debug in the left-hand pane, and then clicking Trace. The Nios II Trace preferences page contains settings that affect how the Nios II IDE Trace view collects and displays data. The settings apply to all projects. The Trace preferences page contains the following settings.
Nios II IDE Help System Profiling Perspective Profiling Perspective You open this perspective by pointing to Open Perspective on the Window menu, and either clicking Profiling or clicking Other..., and then double-clicking Profiling in the Open Perspective list. The Nios II IDE Profiling perspective allows you to conveniently capture and analyze profiling data stored in a gmon.out data file.
GUI Reference Project Properties Dialog Box Properties Dialog Box You open this dialog box by right-clicking a project in the Nios II C/C++ Projects view, and clicking Properties. This dialog box lets you adjust properties settings for your project. The Properties dialog box groups similar settings together on pages, and the pages that appear depend on the project type. The following table describes which properties pages are available for each project type.
Nios II IDE Help System Apply - Saves your settings. Related Nios II IDE Help Topics About Nios II IDE Projects—Contains more information on the Nios II project types.
GUI Reference Associated System Library Page (Properties Dialog Box) You open this properties page by clicking Associated System Library in the left-hand pane of the Properties dialog box for Nios II C/C++ application projects. This page allows you to specify the system library for a Nios II C/C++ application project. Target—Displays the project type Nios II Application. (This value is read only.) System Library—Specifies the associated system library for this application project.
Nios II IDE Help System Builders Page (Properties Dialog Box) You open this properties page by clicking Builders in the left-hand pane of the Properties dialog box for Nios II C/C++ application, Nios II system library, Nios II user-makefile C/C++ application, and Nios II C/C++ library projects. This page lists the builders the Nios II IDE uses to build the project.
GUI Reference C/C++ Build Page (Properties Dialog Box) You open this properties page by clicking C/C++ Build in the left-hand pane of the Properties dialog box for Nios II C/C++ application, Nios II system library, and Nios II C/C++ library projects. This page allows you to specify compilation, preprocessor, and linking options for the nios2elf-gcc compiler and linker. The page is organized in the following sections. Active Configurations This section identifies the current configuration.
Nios II IDE Help System o Optimization Level —Configures the compiler optimization level. Options are -O0 to -O3. The compiler optimizes for both size and speed. Debug Level —Configures the debug level. Include Paths —Lists where the compiler searches for C header files. The Nios II IDE creates a search path including the project directory, device driver directories, the Newlib standard C library, etc. Use Include Paths to specify additional paths to find files in other locations.
GUI Reference o Undefined Symbols—Specifying a symbol here is equivalent to a #undefine macro in source code. General—Configures known flags for the compiler. For a complete list of flags, type nios2-elf-gcc -v --help on a command line or refer to the GNU tools documentation included with the Nios II Embedded Design Suite (EDS). Compiler Flags—Allows additional command line flags to pass to the compiler. Optimization Level—Configures the compiler optimization level. Options are -O0 to -O3.
Nios II IDE Help System C/C++ Documentation Page (Properties Dialog Box) You open this properties page by clicking C/C++ Documentation in the left-hand pane of the Properties dialog box for Nios II C/C++ application, Nios II system library, Nios II user-makefile C/C++ application, and Nios II C/C++ library projects. This page lists available HTML-based C/C++ Help Books which provide context-sensitive help for C/C++ code.
GUI Reference Properties Dialog Box You open this dialog box by right-clicking a project in the Nios II C/C++ Projects view, and clicking Properties. This dialog box lets you adjust properties settings for your project. The Properties dialog box groups similar settings together on pages, and the pages that appear depend on the project type. The following table describes which properties pages are available for each project type. Links to Nios II IDE specific topics appear in the table.
Nios II IDE Help System Related Nios II IDE Help Topics About Nios II IDE Projects—Contains more information on the Nios II project types.
GUI Reference Project References Page (Properties Dialog Box) You open this properties page by clicking Project References in the left-hand pane of the Properties dialog box for Nios II C/C++ application, Nios II system library, Nios II usermakefile C/C++ application, and Nios II C/C++ library projects. This page allows you to specify project dependencies, i.e. other projects that must be built prior to building the selected project.
Nios II IDE Help System System Library Page (Properties Dialog Box) You open this properties page by clicking System Library in the left-hand pane of the Properties dialog box for Nios II system library projects.
GUI Reference Support C++ —When on, the compiler includes code to support C++ applications in the system library. Turn this option off to reduce memory footprint for programs that do not use C++. Lightweight device driver API—When on, the compiler omits code to support file descriptors in the system library. Turn this option off to reduce memory footprint when your programs access device drivers directly.
Nios II IDE Help System Linker Script These settings configure the linker script used when building the project. Custom linker script—When selected, you create and manage your own linker script, and specify it here. Note: Altera strongly recommends that you use the auto-generated linker script. Auto-generated linker script—When selected, the Nios II IDE automatically creates and manages a linker script that is sufficient for most system compilation needs.
GUI Reference Using MicroC/OS-II RTOS with the Nios II Processor Tutorial at www.altera.com/literature/tt/tt_nios2_MicroC_OSII_tutorial.pdf —Contains step-bystep instructions on creating MicroC/OS-II applications.
Nios II IDE Help System RTOS Options Dialog Box (System Library Properties Page) You open this dialog box by clicking RTOS Options on the System Library properties page. The RTOS Options... button is only enabled when something other than none (single threaded) is selected in the RTOS drop-down list. The RTOS Options dialog box lets you adjust settings for the RTOS specified in the RTOS drop-down list on the System Library properties page. The RTOS Options dialog box contains the following controls.
GUI Reference Software Components Dialog Box (System Library Properties Page) You open this dialog box by clicking Software Components... on the System Library properties page. The Software Components dialog box lets you add middleware software components to your system library. The Software Components dialog box contains the following controls. Software components list —Displays the available software components and allows you to select a component.
Nios II IDE Help System Run/Debug Dialog Box Run/Debug Dialog Box You open this dialog box by clicking Run... or Debug... on the Run menu. The Run dialog box allows you to configure and start run sessions, and the Debug dialog box allows you to configure and start debug sessions. The Run and Debug dialog boxes are distinct entities, but their controls are nearly identical. This help topic describes both dialog boxes. The Run and Debug dialog boxes allow you to manage run/debug configurations.
GUI Reference Launch ModelSim Debugger Source Common o o o o o o o Note: The Launch ModelSim tab is not available on the Debug dialog box.
Nios II IDE Help System Common Tab (Run/Debug Dialog Box) You open this tab by clicking the Common tab on the Run/Debug dialog box for the Nios II Hardware and Nios II Instruction Set Simulator (ISS) configurations. The Common tab contains the following settings. Save As - Specifies where to store the run/debug configuration. The following options are available: o Local file—Saves the run/debug configuration under the workspace directory.
GUI Reference Debugger Tab (Run/Debug Dialog Box) You open this tab by clicking the Debugger tab on the Run/Debug dialog box for Nios II Hardware and Nios II Instruction Set Simulator (ISS) configurations. The Debugger tab contains settings that affect the IDE behavior during debug sessions. Some settings also apply to run sessions. Most settings on this tab are grouped by category. Debugger—Allows you to specify the application to use for debugging. The only choice is the Nios II Elf Debugger.
Nios II IDE Help System Note: Altera does not recommend turning off this setting for Nios II hardware targets, because doing so slows down debugging. o GDB command file— Specifies the GDB initialization script file to use when the Use the Altera generated initialization script for faster debug performance setting is off. Note: If you provide your own script, the commands can interfere with the normal startup operation of the debugger. For example, do not use the "run" command in your script.
GUI Reference ISS Settings Tab (Run/Debug Dialog Box) You open this tab by clicking the ISS Settings tab on the Run/Debug dialog box for Nios II Instruction Set Simulator configurations. The ISS Settings tab allows you to configure settings specific to the Nios II instruction set simulator (ISS). Most settings on this tab are grouped by category. Trace Options The following options control how much trace information the ISS reports.
Nios II IDE Help System Memory Dump The following options allow you to save the contents of memory to a file after running a program on the ISS. Enable memory dump —When on, memory contents are dumped to a file after program execution terminates. The resulting file name is _memdump.out, located in the application project directory. o Start Address —Specifies the starting address of the memory range to dump. o End Address —Specifies the ending address of the memory range to dump.
GUI Reference Launch ModelSim Tab (Run Dialog Box) You open this tab by clicking the Launch ModelSim tab on the Run dialog box for Nios II ModelSim configurations. The Launch ModelSim tab contains general settings about the application project, the executable code (.elf), and additional settings required for hardware simulation with ModelSim. The Launch ModelSim tab contains the following settings. Project—Specifies the source application project.
Nios II IDE Help System Main Tab (Run/Debug Dialog Box) You open this tab by clicking the Main tab on the Run/Debug dialog box for Nios II Hardware, Nios II Instruction Set Simulator (ISS), and Nios II Multiprocessor Collection configurations. The options available on the Main tab depend on the configuration type. The following sections describe the options for each configuration type. Nios II Hardware Configurations For Nios II Hardware configurations, the Main tab contains the following settings.
GUI Reference Nios II Instruction Set Simulator For Nios II ISS configurations, the Main tab contains the following settings. Project—Specifies the source application project. The Nios II IDE associates each run/debug configuration with exactly one application project. Nios II ELF Executable—Specifies which executable file (.elf) to download to the target. This setting is read-only for Nios II C/C++ application projects and changeable for Nios II user-makefile C/C++ application projects.
Nios II IDE Help System Source Tab (Run/Debug Dialog Box) You open this tab by clicking the Source tab on the Run/Debug dialog box for Nios II Hardware and Nios II Instruction Set Simulator (ISS) configurations. The Source tab specifies where the debugger searches for source files associated with an executable file. You can specify Nios II IDE project folders and other folders. Note: If you do not have the source code for a file, you can step through the assembly instructions in the Disassembly view.
GUI Reference Target Connection Tab (Run/Debug Dialog Box) You open this tab by clicking the Target Connection tab on the Run/Debug dialog box for Nios II Hardware configurations. The Target Connection tab specifies how the IDE communicates with the target hardware. The Target Connection tab contains the following settings. JTAG cable—Specifies the Altera download cable (such as the USB Blaster) to use for communicating with the Nios II processor.
Nios II IDE Help System Views Call Hierarchy View (Profiling Perspective) This view automatically displays as part of the Profiling perspective. You can also open this view from the Window menu by pointing to Show View, clicking Other..., expanding Profiling, and double-clicking Call Hierarchy. The Call Hierarchy view displays the time spent in each function, based on the standard gmon.out data, in an easy-to-read tree format.
GUI Reference Disassembly View (Debug Perspective) This view is available in the Debug perspective, and automatically displays when execution suspends at a breakpoint. You can also open this view from the Debug perspective manually by pointing to Show View on the Window menu, and then clicking Disassembly. The Disassembly view, also known as "mixed source" view, displays assembly instructions interspersed with the associated C/C++ source code.
Nios II IDE Help System Editor View (Profiling Perspective) This view automatically displays as part of the Profiling perspective. When you open the gmon.out file with the Nios II IDE, the IDE automatically calls gprof and displays the standard gprof text output. This Editor view is for viewing only. Note: Saving the file with the default gmon.out filename overwrites the original gmon.out data. If you save the output as a text file, be sure to rename the saved file.
GUI Reference Nios II C/C++ Projects View (Nios II C/C++ Perspective) This view displays as part of the Nios II C/C++ perspective by default. You can also open this view from the Nios II C/C++ perspective manually by pointing to Show View on the Window menu, and then clicking Nios II C/C++ Projects. The Nios II C/C++ Projects view presents project resources in the context of C/C++ project development, providing visual cues and hierarchy to organize the various files in your projects.
Nios II IDE Help System Other...—Opens the New wizard to allow you to create the resource of your choice. Go Into This command limits the Nios II C/C++ Projects view display to just the selected project. To return to displaying all projects, click Back in the Nios II C/C++ Projects view toolbar. Open in New Window This command opens a new Nios II IDE window. Important: Altera does not recommend working on the same project simultaneously in separate windows.
GUI Reference Build Project This command builds the selected project (i.e. runs make). You can modify build settings on the C/C++ Build page of the Properties dialog box. Build Project is also available from the Project menu. Clean Project This command discards all previous build results. Rename & Move These commands allow you to rename and move resources. Renaming or moving a resource might have repercussions on other projects that reference the resource.
Nios II IDE Help System Team The Eclipse IDE framework supports team-based development using source control. The Team submenu provides access to the Eclipse team development features. Refer to Related Topics for more information about source control. Compare with, Replace with & Restore from Local History The Eclipse IDE framework provides advanced tools to track history and compare changes made to source files. The Compare With and Replace With submenus provide access to these features.
GUI Reference Samples - Function Total View (Profiling Perspective) This view automatically displays as part of the Profiling perspective. You can also open this view from the Window menu by pointing to Show View, clicking Other..., expanding Profiling, and double-clicking Samples - Function Total. This view uses the gmon.out profiling data to show a breakdown of program execution by function executed. An entry for each function sampled during profiling appears in a table.
Nios II IDE Help System Samples - Line By Line View (Profiling Perspective) This view automatically displays as part of the Profiling perspective. You can also open this view from the Window menu by pointing to Show View, clicking Other..., expanding Profiling, and double-clicking Samples - Line By Line. This view uses the gmon.out profiling data to show a breakdown of program execution by line of source code executed. An entry for each code line sampled during profiling appears in a table.
GUI Reference Trace View (Debug Perspective) You open this view from the Debug perspective by pointing to Show View on the Window menu, and then clicking Trace. The Nios II IDE Trace view displays a disassembly trace of the instructions executed prior to the current breakpoint or watchpoint, and optionally displays load/store addresses and the associated data.
Nios II IDE Help System Workspace Launcher Dialog Box You open this dialog box by clicking Switch Workspace on the File menu. The Workspace Launcher dialog box lets you select the Nios II IDE workspace to use for the current IDE session. The Nios II IDE stores your projects in a directory called a workspace. The workspace is the default area for Nios II IDE projects and other IDE-related settings files. Each user can define one or more workspaces to keep their environments separated as desired.
Troubleshooting This topic contains troubleshooting tips for the Nios II IDE. Q: Where did my existing projects go? A: When the Nios II IDE upgrades to a newer version of Eclipse and CDT, the IDE uses a new, fresh location to store projects. Your older projects do not display in the Nios II C/C++ Projects view, but they are still available. To access your projects either use the workspace launcher to switch to an existing workspace, or import your projects into the new workspace.
Nios II IDE Help System When Specify Location is off, the New Project wizard always creates a new, valid project directory. Q: Why does the source code not display when stepping in the debugger? A: If you compile a project without the -g compiler option, the IDE cannot display source code during debug sessions. To add debug information to your project, right-click your project and then click Properties . Click C/C++ Build. On the Tool Settings tab, expand Nios II Compiler and click General.
Troubleshooting Q: Why do I get the message "Launch failed. Error starting gdbserver - see console for details" with no other details on the console, when launching a debug session with the Nios II ISS target? A: If you are running an antivirus program with a firewall, it might be blocking the listening tcp port opened by the nios2-iss executable. You must unblock the nios2-iss program to enable it to operate through the firewall.