Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

EPCQ Bootloader problems

Quartus 15.0, Cyclone V design

I'm booting the FPGA from a Micron N25Q128 SPI flash and am trying to transition my NIOS to boot from SPI flash instead of onchip RAM. I've read all of the app notes, white papers, etc. that talk about booting from EPCQ flash and have followed the instructions to the best of my knowledge, but I'm seeing weird results.

My NIOS design currently includes a DDR3 controller (which seems to be working fine for the original design), a Serial Flash Controller (SFC), UART, sysid and timer. The NIOS points to SFC with offset 0x800000 for the reset vector and to DDR with offset 0x20 for the exception vector. I generate HDL in QSYS, no problems.

In Eclispe I build a BSP for the project and set all the linker sections to point to DDR, then generate the BSP. I clean build the application and Make Targets/Build/mem_init_generate.

I compile the Quartus project with no errors.

I convert programming files and build a JIC image that includes the SOF (offset 0x0) and the SFC.HEX images (offset 0x800000).

I launch the Quartus Programmer and load the JIC image into my flash device. I verify the flash just to make sure the image is correct.

When I reboot using the new image, the FPGA comes up but the NIOS does not appear to be functioning (I do not see the messages that I expect on the UART console port). When I reboot a second time I find that the image in flash has become corrupted and the FPGA will no longer boot.

If I download the SOF file directly to the FPGA through the JTAG port and launch a debug session in Eclipse (which writes the application code directly to DDR) everything works as expected. I've been chasing this for most of the week and have run out of ideas.

Any suggestions?

Michael

13 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    booting from EPCQ with the with /f is the current working situation, i believe the /e one will be fixed in the near releases as getting more users are seeing this limitation.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear Pororo,

    Will the /e one be fixed in the Quartus V16.0?

    If I want the NIOS II to run in a higher frequency and the EPCQ flash controller in 25 MHz, will the /f meet my requirement?
    • anvitha's avatar
      anvitha
      Icon for New Contributor rankNew Contributor

      Hi,

      I am also facing same issue with nios2 processor,means we are using cyclone v gx fpga board with epcq64n module.

      here my .sof (hardware file)is booting from epcq but nios 2 application project is not booting.i am also doing so many experiments from 15 days,no improvement .

      please helpto resole this issue

      quartus ver .15.0

      nios/f selected.

      i tried on arrow soc kit also.

      no improvement...........................