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

problems with nios flash programmer

Altera_Forum
Honored Contributor II
1,112 Views

Hi. 

Problems wits Nios Flash Programmer, board with nios on Cyclon II. 

 

I have desined board with Cyclon II , sof-file generate without errors, software designed in IDE NIOS, elf-file compailed. 

 

I configurate my sof-file by JTAG Quartus Programmer, operation complet OK. 

Debugger successfully run program , trace also work. 

 

But i have problem - Nios Flasf Programmer can not programming Epcs flash. 

 

I have log: 

-------------------------------------------------------------------------------------------------------------------------# ! /bin/sh# # This file was automatically generated by the Nios II IDE Flash Programmer.# # It will be overwritten when the flash programmer options change.#  

 

cd C:/altera/qdesigns60/controlmodule/WORKMODULE2/software/workmod2_ver1/Release 

# Creating .flash file for the FPGA configuration 

$SOPC_KIT_NIOS2/bin/sof2flash --epcs --input=C:/altera/qdesigns60/controlmodule/ 

WORKMODULE2/workmodule2.sof --output=workmodule2.flash 

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

Info: Running Quartus II Convert_programming_file 

Info: Command: quartus_cpf --no_banner --convert --device=EPCS64 --option=workmo 

dule2.opt C:/altera/qdesigns60/controlmodule/WORKMODULE2/workmodule2.sof workmod 

ule2.pof 

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

Info: Processing ended: Fri Mar 18 15:39:54 2011 

Info: Elapsed time: 00:00:02 

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

Info: Running Quartus II Convert_programming_file 

Info: Command: quartus_cpf --no_banner --convert workmodule2.pof workmodule2.rpd 

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

Info: Processing ended: Fri Mar 18 15:39:56 2011 

Info: Elapsed time: 00:00:02 

# Programming flash with the FPGA configuration 

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --cable='USB-Blaster [USB-0]' --devic 

e=1 --sidp=0x00000610 --id=1944443831 --timestamp=1300448607 --epcs --base=0x000 

00800 workmodule2.flash 

Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 

Resetting and pausing target processor: OK 

Reading System ID at address 0x00000610: verified 

 

: Checksumming existing contents  

 

00000000 : Verifying existing contents  

 

00010000 : Verifying existing contents  

 

00020000 : Verifying existing contents  

 

00000000 : Reading existing contents  

 

00010000 : Reading existing contents  

 

00020000 : Reading existing contents  

 

Checksummed/read 192kB in 10.6s  

 

00000000 ( 0%): Erasing  

 

00010000 (33%): Erasing  

 

00020000 (66%): Erasing  

 

Erased 192kB in 0.0s  

 

00000000 ( 0%): Programming  

 

Program failed  

Leaving target processor paused 

# Creating .flash file for the project 

$SOPC_KIT_NIOS2/bin/elf2flash --epcs --after=workmodule2.flash --input=workmod2_ 

ver1.elf --output=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/components/altera 

_nios2/boot_loader_epcs.srec 

# Programming flash with the project 

$SOPC_KIT_NIOS2/bin/nios2-flash-programmer --cable='USB-Blaster [USB-0]' --devic 

e=1 --sidp=0x00000610 --id=1944443831 --timestamp=1300448607 --epcs --base=0x000 

00800 epcs_controller.flash 

Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 

Resetting and pausing target processor: OK 

Reading System ID at address 0x00000610: verified 

 

: Checksumming existing contents  

 

00020000 : Verifying existing contents  

 

00020000 : Reading existing contents  

 

Checksummed/read 64kB in 1.9s  

 

00020000 ( 0%): Erasing  

 

Erased 64kB in 0.1s  

 

00020000 ( 0%): Programming  

 

Program failed  

Leaving target processor paused 

 

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

I tried in my software write to epcs, using: alt_write_flash(fd, 0, ibuf_epcs, 256), and read , using alt_read_flash(fd, 0, obuf_epcs, 256).  

Data block was writen successfully and remained in flash after power Off/On.  

Next running nios flash programmer only erase Epcs. 

Sometime flash programmer can finish programming, but data really not stored in Epcs, only erasing is completed. 

 

I need Help. Have somebody any ideas?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
419 Views

Problem is solved by connecting on line TCK of JTAG capacitor of 10pF to GND.

0 Kudos
Reply