AN 978: Nios® V Processor Migration Guidelines

ID 773196
Date 5/15/2024
Public
Document Table of Contents

4.2.2.2. Software Component

The software development flow starts with Board Support Package (BSP) and application (APP) creation. Altera recommends you to create a software folder with app and bsp sub-folders inside your Quartus® Prime project directory. Nios® II processor software also practice similar file organization.
Figure 11.  Nios® Processor Software Project File Directory
Note: Generated Nios® II processor software files are not compatible with the Nios® V processor. You need to regenerate the Nios® V processor BSP and APP project.

Nios® V Processor BSP Regeneration

  1. To open the BSP Editor, go to Platform Design > File > New BSP.
  2. Set the BSP Setting File as settings.bsp. Select the destination folder to the BSP folder.
  3. Select the design QSYS file in the System file (qsys or sopcinfo) field, then click Create.
    Figure 12.  Nios® V Processor BSP Creation
  4. Apply the same Nios® II processor BSP settings into the Nios® V processor BSP settings. Refer to Intel HAL Settings to migrate the BSP Settings.
    Figure 13.  Nios® V BSP Settings
  5. Select the appropriate memory region for exception vector in BSP Editor > Linker Script
    Figure 14. Linker Script
  6. Click Generate BSP to create a new BSP project for Nios® V processor.

Nios® V Processor APP Generation

  1. Copy the Nios® II application source codes into the APP folder.
  2. Start the Nios V Command Shell.
  3. Run niosv-app command to create an APP CMakeLists.txt file.
    niosv-app -b=<BSP directory> -a=<APP directory> -s=<Nios II application source codes>
  4. Run CMake executable.
    cmake -B <APP directory>/build -S <APP directory> -G “Unix Makefiles”
  5. Run Make executable. After successful Make, the Nios® V processor software ELF file is located in the <APP directory>/build folder.
    make -C <APP directory>/build
  6. Download the software ELF file into the Nios® V processor system.
    niosv-download <Nios V ELF file>
  7. Open JTAG UART terminal to print the Hello World message.
    juart-terminal

Alternatively, you can use Ashling* RiscFree* IDE for Intel® FPGAs for Nios® V processor software development. After the BSP creation and APP creation, you can import both folder into the workspace of Ashling* RiscFree* IDE for Intel® FPGAs to continue.