Forum Discussion

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

Problem using Flash Programmer

Hello,

I have problem using Flash Programmer.

I am trying to write something to flash of my custom board,

but doesn't seem to work..

Below message appears:

------------------------------------------

[SOPC Builder]$ nios2-flash-programmer --input=xxx_fpga.flash --sof=d:/doors_h ome/xxx/xxx_board/system/xxx_board.sof --base=0x00800000

WARNING: Default charset MS932 not supported, using ISO-8859-1 instead Oct 6, 2005 8:32:57 PM - (??) nios2-flash-programmer: Launching Quartus Program er to download:

d:/doors_home/xxx/xxx_board/system/xxx_board.sof

Oct 6, 2005 8:33:01 PM - (???) nios2-flash-programmer: Error opening target har ware

Oct 6, 2005 8:33:01 PM - (???) 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.

--------------------------------------------

I think I am not doing totally wrong,

since I can write something into EPCS using nios2-flash-programmer,

and it seems to work just fine.

Any advice will be great.

9 Replies

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

    --- Quote Start ---

    originally posted by fuji@Oct 6 2005, 08:03 AM

    hello,

    i have problem using flash programmer.

    i am trying to write something to flash of my custom board,

    but doesn't seem to work..

    below message appears:

    ------------------------------------------

    [sopc builder]$ nios2-flash-programmer --input=xxx_fpga.flash --sof=d:/doors_h ome/xxx/xxx_board/system/xxx_board.sof --base=0x00800000

    warning: default charset ms932 not supported, using iso-8859-1 instead oct 6, 2005 8:32:57 pm - (??) nios2-flash-programmer: launching quartus program er to download:

    d:/doors_home/xxx/xxx_board/system/xxx_board.sof

    oct 6, 2005 8:33:01 pm - (???) nios2-flash-programmer: error opening target har ware

    oct 6, 2005 8:33:01 pm - (???) 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.

    --------------------------------------------

    i think i am not doing totally wrong,

    since i can write something into epcs using nios2-flash-programmer,

    and it seems to work just fine.

    any advice will be great.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10191)

    --- quote end ---

    --- Quote End ---

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

    Hi fuji,

    Sorry about the last post ... I fat-fingered it ... still getting used to the new buttons ;-)

    > SOPC Builder]$ nios2-flash-programmer --input=xxx_fpga.flash

    > --sof=d:/doors_h ome/xxx/xxx_board/system/xxx_board.sof --base=0x00800000

    Did you create the xxx_fpga.flash file with sof2flash? What parameters did you use?

    Regards,

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

    --- Quote Start ---

    originally posted by smcnutt@Oct 6 2005, 09:26 AM

    hi fuji,

    sorry about the last post ... i fat-fingered it ... still getting used to the new buttons ;-)

    > sopc builder]$ nios2-flash-programmer --input=xxx_fpga.flash

    > --sof=d:/doors_h ome/xxx/xxx_board/system/xxx_board.sof --base=0x00800000

    did you create the xxx_fpga.flash file with sof2flash? what parameters did you use?

    regards,

    --scott

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10195)

    --- quote end ---

    --- Quote End ---

    Since it needs a file of <cuuston_board_name>.ptf

    when programme flash, I think you must make this

    file with the command of ma_target_board.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello,

    Thank you very much, smcnutt and eltonlaonong.

    I think my problem is that the flash we use is NOT cfi flash.

    The flash driver we made works good.

    We had a cyclone evaluation board at hand,

    so we made totally new files assumming this being a custom board,

    and Flash Programmer worked just fine.

    I guess there was nothing wrong with the procedures we took to make our own custom board.

    I saw some posts with similar problem using non cfi flash.

    Is there anyway I can use Flash Programmer on non cfi flash?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I&#39;m still waiting for an answer on that one. Basically, you&#39;d have to write your own flash programmer target code for your target board, but you have to know the flash programmer&#39;s protocol on the JTAG UART in order to do that.

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

    Hello,

    I have replaced my non cfi flash to cfi flash,

    and Flash Programmer worked just fine.

    Just wanted to let you know.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Which way should I use to write my program to the Flash on my customized development board?? using the JTAG of FPGA???

    Thank you !!!!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I got around the problem by doing a separate configuration for the PLD, containing a small program in internal-ROM to accept the flash HEX data from a serial port and write programming instructions to the flash.