Specifications
Note: If you want to view the BSP source files while debugging, you also need to import the BSP
project into the Nios II SBT for Eclipse.
Related Information
Getting Started with the Graphical User Interface on page 2-1
For a description of importing BSPs into Eclipse, refer to “Importing a Command-Line Project”.
Download Executable Code and Start the Debugger
To debug the software project, perform the following steps:
1. Right-click the hello_world project, point to Debug As, and click Nios II Hardware.
2. If the Confirm Perspective Switch dialog box appears, click Yes.
After a moment, you see the main() function in the editor. There is a blue arrow next to the first line
of code, indicating that execution is stopped on this line.
When targeting Nios II hardware, the Debug As command does the following tasks:
• Creates a default debug configuration for the target board.
• Establishes communication with the target board
• Optionally verifies that the expected SOPC Builder system is configured in the FPGA.
• Downloads the .elf file to memory on the target board.
a. Sets a breakpoint at main().
• Instructs the Nios II processor to begin executing the code.
3. In the Run menu, click Resume to resume execution. You can also resume execution by pressing F8.
When debugging a project in Eclipse, you can also pause, stop, and single-step the program, set
breakpoints, examine variables, and perform many other common debugging tasks.
Related Information
• Importing a Command-Line Project on page 2-22
For more information about debugging projects in the Nios II SBT for Eclipse.
• Getting Started with the Graphical User Interface on page 2-1
For more information about debugging projects in the Nios II SBT for Eclipse, refer to “Getting
Started with Eclipse”.
Software Build Tools Scripting Basics
This section provides an example to teach you how you can create a software application using a
command line script.
In this section, assume that you want to build a software application for a Nios II system that features the
LAN91C111 10/100 Non-PCI Ethernet Single Chip MAC + PHY component and supports the
NicheStack
®
TCP/IP stack. Furthermore, assume that you have organized the hardware design files and
the software source files.
3-8
Download Executable Code and Start the Debugger
NII5V2
2015.05.14
Altera Corporation
Getting Started from the Command Line
Send Feedback