Visible to Intel only — GUID: bhc1423797271322
Ixiasoft
Visible to Intel only — GUID: bhc1423797271322
Ixiasoft
1.8. Setting Up the Software Command Line Environment
The primary user interface to the Nios II control unit is through a terminal console that transmit user commands to the Nios II processor via the JTAG UART peripheral. Altera provides the Nios II software build tools (SBT) via the Eclipse Integrated Development Environment (IDE). You can use this tool to view, edit, compile the source code, download the executable code to hardware, and generate a terminal console window for you to enter commands.
- Launch the Quartus II software.
- Compile and download the programming file onto the hardware platform as described in Generating Programming File section.
- In the <project directory>/jesd204b_nios_ref_design/jesd204b_ed/ directory, create a new folder named software.
- On the Tools menu, select Nios II Software Build Tools for Eclipse.
- In the Select a workspace dialog box, navigate to the software workspace, <project directory>/jesd204b_nios_ref_design/jesd204b_ed/software and click OK.
- Create a new Nios II application and board support package (BSP) from the template. On the File menu, navigate to New and click on Nios II Application and BSP From Template.
- In the Nios II Application and BSP From Template window, enter the following information:
- SOPC Information File Name: <project directory>/jesd204b_nios_ref_design/jesd204b_ed/jesd204b_ed_qsys.sopcinfo
- Project name: jesd204_nios_ed
- Use default location: Checked
- Templates: Hello World
- Click Next. Verify that the default BSP name is jesd204_nios_ed_bsp, then click Finish. The Nios II application project (jesd204_nios_ed) and BSP (jesd204_nios_ed_bsp) appears in the Project Explorer window.
- Whenever you modify and recompile the Quartus II project, the BSP must be regenerated. In the Project Explorer window, right-click on the jesd204_nios_ed_bsp project, navigate to Nios II and click Generate BSP. This regenerates the BSP based on your most current compiled Quartus II project settings.
- Copy all the C source files (*.c) and header files (*.h) from <project directory>/jesd204b_nios_ref_design/software to <project directory>/jesd204b_nios_ref_design/jesd204b_ed/software. Delete the hello_world.c source file from the <project directory>/jesd204b_nios_ref_design/jesd204b_ed/software folder.
- To compile the C code, navigate to the Project menu and select Build All. The compiler now compiles the C code into executable code.
- To download the executable code to the hardware, navigate to the Run menu and select Run Configurations. In the Run Configurations window, double click Nios II Hardware on the left panel. Double check that all run configurations are correct then click Run on the bottom right corner.
The tool downloads the executable code onto the hardware and executes the code. The code initializes the link and opens up a terminal console with a prompt for you to enter commands to the Nios II processor.