Forum Discussion

watanabe's avatar
watanabe
Icon for New Contributor rankNew Contributor
1 month ago

Nios V XIP boot from UFM does not work with dual configuration on FPGA 10M50 Evaluation Kit

Hello,

I am currently testing a project using Nios V on the "FPGA 10M50 Evaluation Kit". I am trying to boot the Nios V application from UFM using XIP (Execute In Place) with the dual configuration setting.

However, I have not been able to successfully boot from UFM, even after checking the following items:

* FPGA and board wiring

* BSP Editor configuration

* Standalone execution of the Nios V application (a simple LED blinking application)

The Nios V application runs correctly as a standalone project, but it does not boot from UFM.

I suspect that the issue may be related to my BSP Editor configuration. (I previously had some difficulties with a similar boot configuration when using Nios II.)

I have attached my project files. If possible, could someone please review my project files and advise what might be causing the issue?

*Note: The project was created under the D: drive on my PC.*

-----------------------------------------------------------------------------------------------------------------

This is not directly related to the boot issue, but I also noticed another behavior with the Nios V application.

When I tried to use "usleep()" in the application, the build completed successfully, but during execution the delay seemed to be ignored. If there is any required configuration or setting for "usleep()" to work correctly with Nios V, I would appreciate any advice.

Thank you very much for your help.

3 Replies

  • ai_responder's avatar
    ai_responder
    Icon for Community Manager rankCommunity Manager

    Thank you for your inquiry. To ensure an accurate response, your request has been routed to an Altera application engineer for further review and assistance.


    Note: To continue using AI Responder, please start your next inquiry with ai_responder

    Disclaimer (Beta): The AI Responder is currently provided as a beta feature. AI-generated responses may contain errors or omissions. Please verify technical guidance with official Altera documentation before implementation.

    Thank you very much.

  • Naji_Naufel_Arrow's avatar
    Naji_Naufel_Arrow
    Icon for Occasional Contributor rankOccasional Contributor

    Hi,

    I have a MAX10 (MAX1000 board with 10M08) running XIP with a NIOS-V. I will attach the AppNote PDF file. It goes through important settings in the UFM IP parameter editor, BSP settings (to match those in UFM) and generation. 

    I believe that usleep requires this header file:

    #include "unistd.h" // for usleep() command

    I hope this helps.

  • Hi watanabe


    The standalone LED run shows the Nios V design works when the ELF is downloaded. UFM execute-in-place is a different boot path. usleep() is separate from that.


    In Dual Compressed Images mode, keep the two FPGA images in CFM0–CFM2 and the Nios V application in UFM0/UFM1. Set that same mode in the On-Chip Flash IP and in Device and Pin Options. A mismatch fails with Error (14740). Assign Hidden Access to every CFM region, set the Nios V reset agent to On-Chip Flash, and point the reset vector at the UFM base address. Program the application into UFM, then power-cycle. On this kit, SW2.3 (CONFIG_SEL) selects the first image: low is CFM0, high is CFM1 or CFM2. Do not erase or write UFM while executing from it. Use a hardware breakpoint to debug that code.


    Put .text in On-Chip Flash and the writable sections in RAM. Enable allow_code_at_reset, enable_alt_load, enable_alt_load_copy_rodata, and enable_alt_load_copy_rwdata. If .exceptions is in RAM, also enable enable_alt_load_copy_exceptions.


    For usleep(), include <unistd.h> and check hal.sys_clk_timer. The default clock is the Nios V built-in timer. A missing delay is a system-clock setting. UFM execute-in-place can make the same code take longer than execution from on-chip RAM.


    Best wishes