Forum Discussion

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

problems rebuilding the supplied EPCS boot loader controller code

HI All,

I have a problems rebuilding the supplied EPCS boot loader controller code

I have a simple project that currently boots an image from EPCS, I wish to edit the boot loader source to support multi image boot.

So, firstly before i do any edits I thought I'd make sure i could build and boot the supplied EPCS boot loader code from source, this is where im having the problem.

My setup:

cyclone III EP3C40 (custom board)

Quartus Ver 90

EPCS controller at Address 0x800

in the niosII shell i go to the folder:

c:\altera\90\nios2eds\components\altera_nios2\boot_loader_sources

and do the following:

[NiosII EDS]$ make CODE_BASE=0x000000 EPCS_REGS_BASE=0x800 clean all

[NiosII EDS]$ elf2hex --base=0 --end=0x1ff --width=32 obj/boot_loader_epcs_sii_siii_ciii.elf epcs_flash_controller_0_boot_rom.hex

I then copy this hex file to my project folder (overwriting the existing) and rebuild the project in Quartus.

Then go to the Nios IDE, clean and build my existing working project, then using the Flash programmer tool reprogram my EPCS, but on cycling the power the board no longer boots...

Any advice anyone can give on this would be greatly appreciated.

How have other people rebuilt this code ?

Thanks in advance

Jed

5 Replies

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

    further,

    the boot loader hex i build is 2k in size where the original in my project folder was 6K, there is something simple missing here....

    anyone know where the "epcs_flash_controller_boot_rom.hex" file comes from ?, initially the /obj folder under the /boot_loader_sources didn't exist ?

    Am i using the wrong source files ?

    Jed

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

    It seems that with Quartus 9, the programmer doesn't put the software correctly in the EPCS device when used with a Cyclone III, preventing the Nios to boot.

    This is not corrected in SP1, but should in SP2. There is a thread on the subject in the Nios forum.

    The behavior of this bug is that NiosII on Cyclone III does not boot up from EPCS if you programmed SOF and ELF with v9.0 Flash Programmer.

    The workaround:

    replace 90\nios2eds\bin\sof2flash.jar with 81\nios2eds\bin\sof2flash.

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

    Hi,

    Did you finally do it? I have the same problem,

    I did the same as you to create the .hex, but it doesn´t boot anymore.

    What was wrong?

    thanks,

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

    Yes, I used an earlier version of the source files, the source that was installed with Quartus Version 7 worked for me....

    Hope that helps

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

    I´m working with Quartus 9.0, I have no files from other Quartus version.

    Could you please send my the Quartus 7 "boot_loader_sources" you´ve used? or tell me where can I find them?

    I´m still having a .hex file of 2K and it doesn´t boot.

    Thanks in advance,

    Melo