Chapter 1: Nios II Hardware Development
1–35
Creating the Design Example
May 2011
Altera Corporation
Nios II Hardware Development Tutorial
4. Click
OK
. The BSP regenerates, the
Properties
dialog box closes, and you return to
the Nios II SBT for Eclipse.
5. In the Project Explorer view, right-click the
count_binary
project and click
Build
Project
.
The
Build Project
dialog box appears, and the Nios II SBT for Eclipse begins
compiling the project. When compilation completes, a "count_binary build complete"
message appears in the Console view.
Run the Program on Target Hardware
In this section you download the program to target hardware and run it. To download
the software executable to the target board, perform the following steps:
1. Right-click the
count_binary
project, point to
Run As
, and then click
Nios II
Hardware
. The Nios II SBT for Eclipse downloads the program to the FPGA on the
target board and the program starts running.
1
If the
Run Configurations
dialog box appears, verify that
Project name
and
ELF file name
contain relevant data, then click
Run
.
When the target hardware starts running the program, the Nios II Console view
displays character I/O output.
shows the output. If you connected
LEDs to the Nios II system in
“Integrate the Qsys System into the Quartus II
, then the LEDs blink in a binary counting pattern.
2. Click the
Terminate
icon (the red square) on the toolbar of the Nios II Console
view to terminate the run session. When you click the
Terminate
icon, the Nios II
SBT for Eclipse disconnects from the target hardware.
You can edit the
count_binary.c
program in the Nios II SBT for Eclipse text editor and
repeat these two steps to witness your changes executing on the target board. If you
rerun the program, buffered characters from the previous run session might display in
the Console view before the program begins executing.
f
For information on running and debugging programs on target hardware, refer to the
tutorial in the
Getting Started with the Graphical User Interface
Nios II
Software Developer’s Handbook
.
Figure 1–22. Console View Displaying Nios II Hardware Output