User guide
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 nios2-
iss from a Nios II command shell, although Altera recommends command-line usage only to
advanced users.
To automatically create a run/debug configuration and start running or debugging:
1. Right-click your project in the Nios II C/C++ Projects view.
2. Point to Run As or Debug As, and then click Nios II Instruction Set
Simulator. The Nios II IDE automatically performs the following tasks:
Creates a default run/debug configuration for the ISS target, placing it in
the configurationslist under Nios II Instruction Set Simulator in the
Run/Debug dialog box.
Initiates a run or debug session.
To manually create a run/debug configuration and start running or debugging:
1. Right-click your project in the Nios II C/C++ Projects view.
2. Click Run... or Debug... on the Run menu. The Run/Debug dialog box appears.
3. Right-click the Nios II Instruction Set Simulator target type in the
configurations list.
4. Click New. The Nios II IDE performs the following tasks:
Creates a new ISS target configuration, placing it in the configurationslist
under Nios II Instruction Set Simulator.
Turns on break at main on the Debugger tab.
5. Click the ISS Settings tab. The ISS Settings tab appears.
6. Adjust any settings you desire to change.
7. Click Run or Debug in the lower-right corner of the Run/Debug dialog box to
initiate the run or debug session.
The Nios II IDE performs the following operations when starting a run or debug session:
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.
Passes the executable software file (.elf) to the ISS.
Sets a breakpoint at main(). (debugging only)
Instructs the Nios II processor to begin executing the code.
Suspends code execution at main(). (debugging only)
Note: After using Run As, Run, Debug As, or Debug once, click Run or Debug
on the toolbar to run or debug again.
63