User guide

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.
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 Hardware. The Nios II
IDE automatically performs the following tasks:
Creates a default run/debug configuration for the target board, placing it
in the configurations list under Nios II Hardware in the Run/Debug
dialog box.
Selects a default JTAG download cable.
Note: This step usually completes automatically without user
intervention. If it cannot (the most common cause is that you have
multiple JTAG download cables installed), the IDE displays an error
message, and you must manually set up a run configuration.
Initiates a run or debug session.
To manually create a run/debug configuration and start running or debugging:
1. Click your project in the Nios II C/C++ Projects view.
2. On the Run menu, click Run... or Debug.... The Run/Debug dialog box appears.
3. Right-click the Nios II Hardware target type in the configurations list, and then
click New. The Nios II IDE performs the following tasks:
Creates a new hardware target configuration, placing it in the
configurationslist under Nios II Hardware.
Selects a default JTAG download cable on the Target Connection tab.
Turns on break at main on the Debugger tab.
4. 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:
61