Specifications

The .sof file resides in <projects>, along with your Quartus II Project File (.qpf). You download it by
typing the following commands:
cd <projects>r
nios2-configure-sofr
The board is configured and ready to run the project’s executable code.
The nios2-configure-sof utility runs the Quartus II Programmer to download the .sof file. You can
also run the quartus_pgm command directly.
For more information about programming the hardware, refer to the Nios II Hardware Development
Tutorial.
3. Start another command shell. If practical, make both command shells visible on your desktop.
4. In the second command shell, run the Nios II terminal application to connect to the Altera develop‐
ment board through the JTAG UART port by typing the following command:
nios2-terminalr
5. Return to the original command shell, and ensure that <projects>/software_examples/app/
hello_world is the current working directory.
6. Download and run the hello_world executable program as follows:
nios2-download -g hello_world.elfr
The following output appears in the second command shell:
Hello from Nios II!
Related Information
Nios II Hardware Development Tutorial
Debugging hello_world
An integrated development environment is the most powerful environment for debugging a software
project. You debug a command-line project by importing it to the Nios II SBT for Eclipse. After you
import the project, Eclipse uses your makefiles to build the project. This two-step process combines the
advantages of the SBT command line development flow with the convenience of a GUI debugger.
This section discusses the process of importing and debugging the hello_world application.
Import the hello_world Application
To import the hello_world application, perform the following steps:
1. Launch the Nios II SBT for Eclipse.
2. On the File menu, click Import. The Import dialog box appears.
3. Expand the Nios II Project folder, and select Import Nios II project.
4. Click Next. The File Import wizard appears.
5. Click Browse and navigate to the <application> directory, containing the hello_world application
project.
6. Click OK. The wizard fills in the project path.
7. Type the project name hello_world in the Project name box.
8. Click Finish. The wizard imports the application project.
NII5V2
2015.05.14
Debugging hello_world
3-7
Getting Started from the Command Line
Altera Corporation
Send Feedback