Forum Discussion

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

How can i burn my *.flash file into the flash

I have a *.flash file,now,I want to burn it into the flash at the address of 0x100000 . I use the nios2-flash programmer,the command line is :

nios2-flash-programmer --base=0x100000 --input=altera_nios_dev_board_cyclone_1c20.sof --input=filesys.flash

but the output is:

Aug 6, 2004 10:55:36 AM - (??) nios2-flash-programmer: Launching Quartus Progr

mer to download:

altera_nios_dev_board_cyclone_1c20.sof

Aug 6, 2004 10:55:52 AM - (??) nios2-flash-programmer: Error opening target ha

ware

Aug 6, 2004 10:55:52 AM - (??) nios2-flash-programmer: Unable to open flash

evice after successfully communicating

with target.

It is likely that you are using a flash-programming FPGA design which

was not created for your target board.

In order to program flash, you must first create a purpose-built

flash-programming design (i.e. FPGA configuration) and associate it with

your particular board. The Nios development kit is delivered with purpose-b

lt

flash-programming designs pre-built for several development boards. If you

sh

to program flash on your own board, you must first create a flash-programmin

design.

The process of creating a flash-programming design for your board is mostly

automated. From a bash-shell, execute this script:

mk_target_board --help

what's wrong with me?

2 Replies

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

    You took the same trap as i did..

    You have to specify the destination address in the flash while converting from .sof to .flash with

    "sof2flash --input=x.sof --output=x.flash --base=0x100000" (or whatever)

    At the flash-programmer you have to specify the address where the programmer can find your flash device .

    This is 0x800000 on the standard altera nios2 dev boards. I don't know for nios1 designs, but if you open

    them in sopc-builder you can extract this value....

    nios2_flash_programmer --input=x.flash --sof=altera_nios_dev_board_cyclone_1c20.sof --base=0x800000

    i hope this helps...
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you very much! I have resloved my problem. Best wishes to you!