Digital Signal Processing Reference
In-Depth Information
and select Run As Nios II Hardware . If the run settings dialog box appears,
click the Run button to close this box. If the run settings dialog box appears,
click the Run button to close this box.
16.8 Executing the Software
Once the program code has been downloaded to the Nios II processor's
program memory (SRAM in this configuration), your code automatically
begins executing. As a part of the normal download process, the Nios II IDE
downloads your program to memory and then reads the program memory back
to verify that the code in program memory is correct. If there are any problems
with downloading your program, then the processor is stalled and a message
that alerts you to this fact appears in the Console pane in the bottom right-hand
side of the Nios II IDE window. If this happens, verify that SW9 is in the up
(on) position and then right click the rpds_software item in the Nios II C/C++
Projects pane and select Run As Nios II Hardware again.
Once your program begins executing, the Nios II IDE's Console pane becomes
a standard input/output terminal connected to your processor via the RS-232
UART device and cable. The text message “Hello World” should appear in the
Console pane as soon as your program begins. Also, eight of the red LEDs on
the DE board should blink one at a time.
16.9 Starting Software Design for a Peripheral Test Program
Now that you have written your first program and have it successfully running
on the DE board, it is time to write a longer program that will test each of the
major peripheral components on the DE board.
A second project can be added to the current workspace, and since the same
Nios II processor is being used for all projects in this workspace, the same
system library can be used for them all. This option will be selected in the
dialog box shown in Figure 16.9.
To create a new project, select File New Project… . The New Project
wizard will begin. On the first dialog box, select Nios II C/C++ Application
and click Next to continue.
In the next dialog box, fill in the requested information. The name of the
project is rpds_de_test , the SOPC Builder System should point to the
nios32.ptf file in your hardware project directory, and the Project Template
should be set to Blank Project . If the workspace was correctly set to your
project directory as detailed above, then the default location will be correct and
Specify Location should be unchecked. However, if the workspace is set to
some other directory, then select Specify Location and enter
c:\ your_project_directory \software in the Location field. Click Next to
continue.
In the final dialog box, select the option Select or create a system library and
choose the rpds_software_syslib project from the list of Available System
Library Projects for: nios32 as shown in Figure 16.9. Click Finish to create
and open the project.
Search WWH ::




Custom Search