Forum Discussion

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

small boot copier for EPCS

I have a customized board, with 5CEBA4 and EPCS16. I want the FPGA boot from a specified SW image address after the HW image is loaded.

I studied AN458, and I think the small boot copier is good for my application. But the source code of AN458 is for cfi flash, not EPCS. Besides, I don't need the image header, and the .flash format is too large for EPCS16. Anyone else experience something similar? Please give me some help!

Besides, I find someone has directly modified the bootloader software as: http://www.alteraforum.com/forum/showthread.php?t=28813. If it works, anyone could show me which files are needed, how to modify the boot address, and how to compile them with Nios2 SBT?

Thank you very much.

Derek

15 Replies

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

    I can't access Quartus right now in order to check, but if I remember correctly, you simply need to point to the right bootloader hex in the epcs device properties in Qsys/SOPC builder.

    Then, again in Qsys, in Nios properties, you set epcs base address as nios reset vector
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Cris,

    I am using "EPCS/EPCQx1 serial flash controller" IP, but I can't find the entry to set the .hex file. Could you please help me to double check it when you are available?

    Thank you and best wishes,

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

    You are right. I forgot this point.

    Actually the epcs mif points to a epcs_controller_boot_rom.hex file which is automatically added by Quartus to your project folder whenever you instantiate the epcs component.

    If you want to use a custom boot loader, you must rename your hex this way and replace the default one.

    The tricky part is that the regular file is copied again from Quartus library each time you regenerate the system with Qsys; then you must remember to replace it again with the custom one whenever you make any change in Qsys, otherwise fpga would configure epcs with the standard boot loader and your nios application won't start.

    I never bothered if there's a better way to do this, although I think so.