Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21600 Discussions

Write to Flash utility

Altera_Forum
Honored Contributor II
1,777 Views

Hi, 

 

I am trying to program a design into the Flash memory of a Stratix II DSP Dev Board, and I am running into problems.  

 

A while back, I used a "write to flash utility" to program the Flash on this Board. It was a .exe program written by Altera than ran on the command line, and programmed the Flash with disregard to warnings, such as timestamps not matching, etc. Does anyone know where I can find this Utility? Is there any other way to program the Flash, besides using the Nios IDE "Flash Programmer". Has anyone had problems programming the Flash on this Dev Board?  

 

Thanks in advance, 

-Ben
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
935 Views

I have trouble loading the ES version of this board. Here's what I've done: 

 

1) took altera_dsp_dev_board_stratix_2s60 design from the Stratix II 2S60 DSP kit (compiled for non ES) and recompiled with EP2S60F1020C4ES. I don't have a NIOS license so it generates a time limited sof. 

 

2) program FPGA with time limited sof using Quartus II 

 

3) start NIOS command line and go to desired flash file directory 

 

4) following the directions in http://www.altera.com/literature/ds/es_strii_dsp_dev_kit-v1-1-0.pdf?gsa_pos=1&wt.oss_r=1&wt.oss=stratix%20ii%20dsp%20sof2flash 

 

run: nios2-flash-programmer --base=0x01000000 --device=1 --cable=USB-Blaster --program <filename>.flash 

 

5) the error I get is: 

"There are no NIOS II processors available wich match the values specified. Please check that your PLD is correctly configured, downloading a new SOF file if necessary." 

 

As expected, according to the NIOS II Flash Programmer User Guide, this means that the FPGA load is not correct or the --device, --cable, --instance is not correct. I'm assuming that --device is correct since it is in the Erreta Sheet, the --cable is correct since it worked in Quartus II, and --instance should be correct as well at default. What's wrong with the FPGA load if all I do is change the device to ES. The pinout remains what the datasheet shows as the valid connections to the flash. 

 

 

I'm stuck here. I've used write2flash.exe on the old Stratix 1S25 DSP kit just fine years ago, but it is not included on the installation CD of the the 2S60 kit and I don't know where the CD or utility have gone.  

 

Any suggestions?
0 Kudos
Altera_Forum
Honored Contributor II
935 Views

hi ninjaben, 

 

you could upload to FPGA NIOSII project with flash controller and write flash by nios2-flash-programmer  

 

#  

# programmin USER0 FPGA configuration 

# SW2[0..2] = close, SW2[3] = open, SW2[4..8] = n/d. 

#  

 

# convert .sof to .flash file 

sof2flash --input=my_sof.sof --output=my_sof.flash --offset=0x00900000 

# write flash 

nios2-flash-programmer --base=0x01000000 --program my_sof.flash 

 

startix ii ep2s60 kit offset is a 0x00500000 (not sure, check docs) 

startix ii ep2s180 pro kit offset is a 0x00900000 

 

-- base means base address of the flash controller in the sopc-system.
0 Kudos
Altera_Forum
Honored Contributor II
935 Views

hi aekosky, 

 

Are you sure time-limited nios will start from flash? it needs cable for run. It's probably time-limited nios just doesn't support flash programming.
0 Kudos
Altera_Forum
Honored Contributor II
935 Views

I don't have a NIOS flash build.. I just use the flash loader FPGA load to write to the flash.

0 Kudos
Altera_Forum
Honored Contributor II
935 Views

It looks like the solution was to use the standard example design. 

The steps were: 

 

1) recompile example_designs/vhdl/standard/ project using ES version 

2) load FPGA 

3) run: 

 

nios2-flash-programmer --base=0x0 --device=1 --instance=0 --accept-bad-sysid --cable=USB-Blaster --program <filename>.flash 

 

I'm not sure what was the issue with the other provided code, but this solved the problem.
0 Kudos
Altera_Forum
Honored Contributor II
935 Views

Look at the option --accept-bad-sysid

0 Kudos
Reply