AN 729: Implementing JESD204B IP Core System Reference Design with Nios II Processor

ID 683844
Date 5/04/2015
Document Table of Contents

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.

  1. Launch the Quartus II software.
  2. Compile and download the programming file onto the hardware platform as described in Generating Programming File section.
  3. In the <project directory>/jesd204b_nios_ref_design/jesd204b_ed/ directory, create a new folder named software.
  4. On the Tools menu, select Nios II Software Build Tools for Eclipse.
  5. In the Select a workspace dialog box, navigate to the software workspace, <project directory>/jesd204b_nios_ref_design/jesd204b_ed/software and click OK.
  6. 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.
  7. 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
  8. 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.
  9. 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.
  10. 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.
  11. To compile the C code, navigate to the Project menu and select Build All. The compiler now compiles the C code into executable code.
  12. 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.

Figure 6. Nios II Software Command Line Terminal

Did you find the information on this page useful?

Characters remaining:

Feedback Message