Ashling* RiscFree* Integrated Development Environment (IDE) for Altera® FPGAs User Guide

ID 730783
Date 4/11/2025
Public
Document Table of Contents

2.3.4.2. Connect to a Running Nios® V Processor Application

You can connect to a running Nios® V processor software project on the targeted Altera FPGA using Ashling* RiscFree* IDE for Altera® FPGAs.

Follow these steps to connect to a running project:

  1. Right-click the project folder (application or BSP) in the project explorer and select Debug As > Debug configurations.
  2. Select Ashling RISC-V Hardware Debugging > <Project Name>. Ensure the Project and C/C++ Application match with your project name and your project .elf file respectively.
  3. Under the Main tab, for C/C++ Application, browse to select the application build .elf file. For example: hello.elf.
    Figure 20. Debug Configurations for Nios® V Processor—Main Tab
  4. Under the Debugger tab, set these settings:
    • Debug probe: Agilex SI/SoC Dev Kit (Name of the FPGA board/development kit)
    • Transport type: JTAG
    • JTAG frequency: 16 MHz
    Figure 21. Debug Configurations for Nios® V Processor—Debugger Tab
  5. Click Auto-detect Scan Chain to automatically detect JTAG scan chain information of the target device. Select the options from Device/Tap selection and Core selection.
  6. Turn off Reset mstatus CSR register
  7. Navigate to Startup tab, go to Load Image and Symbols and turn off the following features:,
    1. Load Image
    2. Set Breakpoint
    3. Resume
      Figure 22. Debug Configurations for Nios® V Processor—Startup Tab
  8. Based on the OS you use, configure the OS Awareness settings as follows:
    • Intel HAL: No OS Awareness configuration is required.
    • Other OS: Under the OS Awareness tab, turn on Enable OS Aware Debugging, and select the OS version applicable to you as listed below:
      • OS: μC/OS-II and Version: 2.93.0
      • OS: FreeRTOS and Version: 10.5.0
      • OS: Zephyr and Version: 3.2.0
        Note: Nios® V processor does not support Linux OS.
      Figure 23. Enabling OS Aware Debugging in RISC-V Hardware Debugging
  9. Click Debug. RiscFree* IDE for Altera® FPGAs downloads the program to the target and you can find the console prints as shown in the following diagram.
    Figure 24. Console Prints after Debug Connection is Successful
    Currently, the program is running in debug mode. You can check the Debug tab on the left side of the RiscFree* IDE for Altera® FPGAs.
    Figure 25. Debug state - Running
    Note: Before you proceed to debug, make sure the debugger is in Suspended state. For more information on how to suspend the debugger, refer to GUI for Debugging.
    Figure 26. Debug state - Suspended
  10. Click Suspend icon in the Debug bar.

    To verify the boot copier has copied the application successfully, continue with the following steps:

  11. Go to Window > Show View > Memory Browser.
  12. Select Add Memory Monitor.
  13. Provide the memory address 0x0 and click OK.
    Figure 27. Memory Browser at Address 0x0
  14. Go to <Working directory>/software/app/build/Default folder.
  15. Open the hello.elf.objdump file.
  16. Search for Disassembly of section .entry.
  17. The disassembly shows that the information at starting address 0 is 0x3680006f, which is exactly the same as in the Memory Browser.
  18. You can continue to verify section .exceptions.
    Figure 28. Disassembly of an Application