Forum Discussion

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

Flash Programmer Issue

Hi,

I do have a strange behavior with the flash programmer:

I have two projects, built roughly in the same way, to be programed on to 2 different FPGA boards featuring each an EPCS device.

for the first project everything is fine: the GUI generates two .flash files named project1_epcs_flash_controller.flash and project1_epcs_flash_controller_1_.flash, one for the SOF and one for the ELF.

For the second one it generates only one file, project2_epcs_flash_controller.flash, which is overwritten between the two passes.

What is wrong?

How could I force the GUI to generate the two separate files (I need them for remote flashing!)?

Where is stored the information telling the system how to generate the .flash files?

I've checked every single project files but after 4 hours wasn't still able to find anything.

Any advice welcome!

Thanks

jylo

5 Replies

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

    The GUI is the one that is launched by Eclipse when clicking on the menu "Nios II / Flash Programer CTRL+7"

    I just don't know what kind of script is launched when doing so...

    But the strange thing is why does it work as expected for all projects I've been able to build and not for one particular, which has been, for sure, created by duplicating one of my older projects...

    Thanks

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

    Had you checked is there any elf file being created in the 2nd project? Ensure file directory path in the elf2flash command argument is point to right path.

    ********************

    "<Nios II EDS install path>/bin/elf2flash" --base=0x00000000 --end=0x7fffff

    --reset=0x0

    --input="<your project name>.elf" --output="ext_flash.flash"

    --boot="<path to the bootloader>/boot_loader_cfi.srec"

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

    Yes Mini@nB

    Everything is built from the xml file generated by the GUI and called <project_name>.flash-settings

    The GUI shows the file generation and programming commands for both elf and sof files and everything looks correct.

    The two .flash-settings files (for the 2 projects) are absolutely identical, except for the project name and cpu address (as expected).

    But ... one generates a command which uses only one .flash file identical for both .elf and .sof while the other (the good one) adds a "_1" to the .flash file name allowing me to get the two .flash files that can be sent to a remote location for upgrade.

    I'm guessing the difference may come from another file in the project (.bsp, .sopc_info, .qpf ...) but I've been able to figure which one out.

    Thanks.

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

    Hey guys! I'm trying to execute the memory test template. I select the option to test flash.

    I have checked in the system.h file that the name of the flash is /dev/ext_flash. But when I type in the same name in the nios console, it shows an error

    saying : could not open "/dev/ext_flash"

    any idea how to eliminate this?