Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

how to download the FPGA configuration data in to

Altera_Forum
Honored Contributor II
1,701 Views

hi ,everybody.there is a CFI(common flash interface)flash on my board ,but i only use it to store my software data! how to download the FPGA configuration data in to the flash? 

thanks ! 

with my regard!
0 Kudos
15 Replies
Altera_Forum
Honored Contributor II
1,020 Views

Hi, 

 

NiosII IDE is integrated with a tool name: Flash Programmer. 

You can use it to download software or FPGA configuration file. 

The menu locates at: 

Tools->Flash Programmer 

 

FYI. 

 

regards, 

David
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

i know! but when i download the fpga configuration data to the flash it shows "The target board must define at least one hardware image to program an FPGA configuration."! what shall i do ? 

thanks! with my regard!
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

Hi wbqyy, 

 

Before using flash programmer, you should create a board description for your board so that Flash programmer can identify your Flash device. This function is discussed in QuartusII 5.0 handbook. 

 

As I know, NiosII 5.1 and QuartusII 5.1 will support this functionality without board description. Try it. 

 

FYI 

 

regards, 

David
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

my system could identify the flash ! I also could download the software data into the flash, only when i download the fpga configuration data to the flash, it shows " The target board must define at least one hardware image to program an FPGA configuration." what was wrong ?? 

with my regards!
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

Hi, wbqyy 

 

Sorry I can't help more... 

I always use Altera's kits, so... 

I think this feature must be declared in QuartusII 5.1 hankbook... 

 

If you have any resolution, pls also let me know!:) 

 

Altera's chinese FAE tell me that NiosII 5.1 and QuartusII 5.1 will support this functionality without board description. Try it. 

 

regards, 

David
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

to download ur hardware fpga config code... u hav to use the e command to erase the hardware section (user portion of flash).. then use r command to relocate the stack pointer to the starting of the hardware section, then  

 

nr -p <com port> XXX.hexout 

 

 

u will now prog ur fpga hardware config to ur hardawre section of the flash memory
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

i&#39;m just guesing here ,  

but try to hopen your target board design with sopc  

go to the : "more board system setting tab " 

check if in the :" board system setting " section , there should be at least one hw- image defined
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

I have the same exact problem with the new and improved flash programmer. You are supposed to be able to just create a board description and only need to designate the flash devices in the "Flash Memory" tab. After this, the programmer is supposed to work!! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif  

 

Not only does the programmer NOT work, but once I made a board description, my SOPC system no longer compiles! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/mad.gif  

 

The Flash Programmer GUI gives the error message: 

 

" the target board must define at least one hardware image to program an fpga configuration." 

 

As for the post by Ilan - I don&#39;t have any tab anywhere called "more board system setting tab".  

 

I also tried doing everything from the SDK shell where I had some success programming - but the verify fails!
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

The option "more board system setting tab " 

Is available only in the target board (this is not the design board) 

Read this doc about ug_nios2_flash_programmer.pdf
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

TO_BE_DONE

0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

You could use the nios2-flash-programmer from the command line rather then the IDE. The flash programmer user guide has more details. You can program from the command line without a target board configured. 

 

--dalon
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

 

--- Quote Start ---  

originally posted by dalon@Jan 16 2006, 11:42 AM 

you could use the nios2-flash-programmer from the command line rather then the ide.  the flash programmer user guide has more details.  you can program from the command line without a target board configured. 

 

--dalon 

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

--- quote end ---  

 

--- Quote End ---  

 

 

Yep - I&#39;ve tried the command line method and it "seems" to work, although at the end the Verify fails - and sure enough if I dump the memory using a third party tool (FS2) the memory contents compared to the SREC file are incorrect. about half of the bytes are wrong. It almost seems like timing, but I can R/W to flash memory manually using the FS2 command line interface to Nios...
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

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

--- Quote Start ---  

The current flash programmer user guide only shows how to make a target board using the Board Description Editor - not the old mk_target_board utility.  I&#39;m sorry but I have no idea where you&#39;re going with that.[/b] 

--- Quote End ---  

 

 

 

look at ug_nios2_flash_programmer.pdf 

the chapter : porting the nios II to custom boards 

you will see at page 2-7 step 15 that it do reffer to old mk_target_board utility. 

after you will use this utility a target board design will be created that you could open using the sopc. if you will open it you will find there the "more board system setting " tab  

figure 2-5 of ug_nios2_flash_programmer.pdf shows a picture of that screen with this tab
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

i am confused! what&#39;s vision of the "user guide"you discussed? 

there is NOT any words about "mk_target_board" in my Flash programmer user guide! oh .....
0 Kudos
Altera_Forum
Honored Contributor II
1,020 Views

it&#39;s been so long since I posted on this issue and since then I have had resolution. As it turned out the Altera provided CPLD "configuration controller" does not release the flash I/O pins to tri-state when it is done configuring the FPGA. This was the first problem and so I added TRI&#39;s to the outputs. But, I had forgotten to make pin assignments for a USB controller chip&#39;s control lines that are on the same avalon tri state bus. So, the Nios during flash programming was contending with the USB controller (who was supposed to be quiet on the bus). 

 

Alas, the flash programmer has been working fine ever since then, but NOTE THAT THE VERIFY ALWAYS FAILS EVEN THOUGH DOING A READBACK OF FLASH PROVES THE FLASH CONTENTS ARE 100% CORRECT. No clue why the verify fails - we just ignore it.
0 Kudos
Reply