Forum Discussion

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

problems with programing flash

hi, I have an altera cyclone evalution board (1c12) and I want to program the flash but i fail....

<div class='quotetop'>QUOTE </div>

--- Quote Start ---

[SOPC Builder]$ nios2-flash-programmer --base=0x00000000 standard.flash --sof=/cygdrive/c/altera/kits/nios2/examples/ve

rilog/niosII_cyclone_1c12_eval/standard/standard_eval_board.sof --verbose

1 juin 2006 16:24:24 - (FIN) nios2-flash-programmer: nios2-flash-programmer starting

1 juin 2006 16:24:24 - (INFO) nios2-flash-programmer: args = --base=0x00000000 standard.flash --sof=c:/altera/kits/nios2

/examples/verilog/niosII_cyclone_1c12_eval/standard/standard_eval_board.sof --verbose

1 juin 2006 16:24:24 - (INFO) nios2-flash-programmer: Attempting to read input-data from standard.flash

1 juin 2006 16:24:25 - (INFO) nios2-flash-programmer: Launching Quartus Programmer to download:

c:/altera/kits/nios2/examples/verilog/niosII_cyclone_1c12_eval/standard/standard_eval_board.sof

1 juin 2006 16:24:25 - (FIN) nios2-flash-programmer: Quartus Pgm launched

Info: *******************************************************************

Info: Running Quartus II Programmer

Info: Command: quartus_pgm --no_banner --mode=jtag --operation=p;c:/altera/kits/nios2/examples/verilog/niosII_cyclone_1c

12_eval/standard/standard_eval_board.sof

Info: Using programming cable "Nios II Evaluation Board [USB-0]"

Info: Started Programmer operation at Thu Jun 01 16:24:26 2006

Info: Configuring device index 1

Info: Device 1 contains JTAG ID code 0x020830DD

Info: Configuration succeeded -- 1 device(s) configured

Info: Successfully performed operation(s)

Info: Ended Programmer operation at Thu Jun 01 16:24:26 2006

Info: Quartus II Programmer was successful. 0 errors, 0 warnings

Info: Processing ended: Thu Jun 01 16:24:26 2006

Info: Elapsed time: 00:00:01

1 juin 2006 16:24:26 - (FIN) nios2-flash-programmer: SOF programming done. exit code = 0x0000

Connecting with target design

Attempting to resynch with target

Unable to synchronize with target.

1 juin 2006 16:24:28 - (GRAVE) nios2-flash-programmer: Error opening target hardware

1 juin 2006 16:24:28 - (GRAVE) nios2-flash-programmer:

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-built

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

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

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

The help-message includes references to other documentation on programming

flash and targeting Nios systems to custom board designs.

- exiting.[/b]

--- Quote End ---

What could I do ?

Has someone got the same problem ?

5 Replies

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

    In particular, pay attention to the comment (in red) about using 5.1sp1 or later. There were significant improvements to the flash programmer in 5.1 and using earlier versions is not advised.

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

    --- Quote Start ---

    originally posted by hippo@Jun 1 2006, 10:15 AM

    you should check if your board config fpga with epcs and nios2 boot from cfi flash.

    don&#39;t mix-up.

    http://nioswiki.jot.com/wikihome/operating...flashprogrammer (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/flashprogrammer)

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

    --- quote end ---

    --- Quote End ---

    Thank for your reply. It works better.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi, I just have an other question about flash programmer.

    when I try to my flash with the project, I have this error :

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    [SOPC Builder]$ nios2-flash-programmer --epcs --base=0x0 epcs_controller.flash --sof=../../../../components/altera_nios_eva

    l_board_cyclone_1c12/system/altera_nios_eval_board_cyclone_1c12.sof --verbose

    7 juin 2006 11:23:20 - (FIN) nios2-flash-programmer: nios2-flash-programmer starting

    7 juin 2006 11:23:21 - (INFO) nios2-flash-programmer: args = --epcs --base=0x0 epcs_controller.flash --sof=../../../../compo

    nents/altera_nios_eval_board_cyclone_1c12/system/altera_nios_eval_board_cyclone_1c12.sof --verbose

    7 juin 2006 11:23:21 - (INFO) nios2-flash-programmer: Attempting to read input-data from epcs_controller.flash

    7 juin 2006 11:23:23 - (INFO) nios2-flash-programmer: Launching Quartus Programmer to download:

    ../../../../components/altera_nios_eval_board_cyclone_1c12/system/altera_nios_eval_board_cyclone_1c12.sof

    7 juin 2006 11:23:23 - (FIN) nios2-flash-programmer: Quartus Pgm launched

    Info: *******************************************************************

    Info: Running Quartus II Programmer

    Info: Command: quartus_pgm --no_banner --mode=jtag --operation=p;../../../../components/altera_nios_eval_board_cyclone_1c12/

    system/altera_nios_eval_board_cyclone_1c12.sof

    Info: Using programming cable "Nios II Evaluation Board [USB-0]"

    Info: Started Programmer operation at Wed Jun 07 11:23:27 2006

    Info: Configuring device index 1

    Info: Device 1 contains JTAG ID code 0x020830DD

    Info: Configuration succeeded -- 1 device(s) configured

    Info: Successfully performed operation(s)

    Info: Ended Programmer operation at Wed Jun 07 11:23:31 2006

    Info: Quartus II Programmer was successful. 0 errors, 0 warnings

    Info: Processing ended: Wed Jun 07 11:23:31 2006

    Info: Elapsed time: 00:00:07

    7 juin 2006 11:23:31 - (FIN) nios2-flash-programmer: SOF programming done. exit code = 0x0000

    Connecting with target design

    Attempting to resynch with target

    Attempting to open flash device

    7 juin 2006 11:23:37 - (INFO) nios2-flash-programmer: Extracting data for: FlashDevice at: 0x00000000

    7 juin 2006 11:23:38 - (GRAVE) nios2-flash-programmer: Flash file is too large to fit in flash memory[/b]

    --- Quote End ---

    But my .flash file is only 2 474 Ko. I use an 1c12 eval board.

    Do you now how to fix the problem ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    FOLLOW THE WIKI !!

    What is your epcs controller&#39;s base address ?

    # Creating .flash file for the FPGA configuration

    sof2flash --epcs --input=$SOPC_KIT_NIOS2/examples/verilog/niosII_cycloneII_2c35/standard/standard.sof --output=standard.flash# Programming flash with the FPGA configuration

    nios2-flash-programmer --epcs --base=0x02200000 standard.flash# Creating .flash file for the project

    elf2flash --epcs --after=standard.flash --input=zImage --output=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_epcs.srec# Programming flash with the project

    nios2-flash-programmer --epcs --base=0x02200000 epcs_controller.flash