Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
852 Views

nios system download to epcs4 failed

nios system download to epcs4 failed 

 

 

hi everyone, i want to download my project to epcs, i do the follows 

1.i build a nios project which includes sdram, EPCS/EPCQx1 Serial Flash Controller, and the reset vector memory of the nios is epcs_flash_controller_0.epce_control_port(of course there are sysid pll, and so on), i change the Dual-Purpose Pins to "Use as regular I/O"; 

2.the software project is very simple, just led the led blink; 

3.in the eclipse, i debug the project, and it works(the led blinking) 

4.i download the sof and elf file though flash programmer,  

5.when i finish the download, the flash programmer did not tell me the download is failed, but the led is not blinking, so at least the nios did not run. 

 

 

 

 

the "processing" content in flash programmer 

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

Info: Info: Running Quartus II 32-bit Convert_programming_file 

Info: Info: Command: quartus_cpf --no_banner --convert --device=EPCS128 --option=E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.opt E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex3/ex2.sof E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.pof 

Info: Info (210033): Memory Map File E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.map contains memory usage information for file E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.pof 

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

Info: Info: Peak virtual memory: 185 megabytes 

Info: Info: Processing ended: Tue Jun 16 13:44:49 2015 

Info: Info: Elapsed time: 00:00:01 

Info: Info: Total CPU time (on all processors): 00:00:01 

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

Info: Info: Running Quartus II 32-bit Convert_programming_file 

Info: Info: Command: quartus_cpf --no_banner --convert E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.pof E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.rpd 

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

Info: Info: Peak virtual memory: 180 megabytes 

Info: Info: Processing ended: Tue Jun 16 13:44:51 2015 

Info: Info: Elapsed time: 00:00:01 

Info: Info: Total CPU time (on all processors): 00:00:01 

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

Info: Resetting and pausing target processor: OK 

Info: Reading System ID at address 0x00012010: verified 

Info: 

Info: : Checksumming existing contents  

Info: 

Info: 00000000 : Verifying existing contents  

Info: 

Info: 00010000 : Verifying existing contents  

Info: 

Info: 00020000 : Verifying existing contents  

Info: 

Info: 00000000 : Reading existing contents  

Info: 

Info: 00010000 : Reading existing contents  

Info: 

Info: 00020000 : Reading existing contents  

Info: 

Info: Checksummed/read 51kB in 1.4s  

Info: 

Info: 00000000 ( 0%): Erasing  

Info: 

Info: 00010000 (33%): Erasing  

Info: 

Info: 00020000 (66%): Erasing  

Info: 

Info: Erased 192kB in 1.6s (120.0kB/s)  

Info: 

Info: 00000000 ( 0%): Programming  

Info: 

Info: 00010000 (33%): Programming  

Info: 

Info: 00020000 (66%): Programming  

Info: 

Info: Programmed 142KB +50KB in 4.6s (41.7KB/s)  

Info: Did not attempt to verify device contents 

Info: Leaving target processor paused 

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

Info: Resetting and pausing target processor: OK 

Info: Reading System ID at address 0x00012010: verified 

Info: 

Info: : Checksumming existing contents  

Info: 

Info: 00020000 : Verifying existing contents  

Info: 

Info: 00020000 : Reading existing contents  

Info: 

Info: Checksummed/read 32kB in 0.8s  

Info: 

Info: 00020000 ( 0%): Erasing  

Info: 

Info: Erased 64kB in 0.5s (128.0kB/s)  

Info: 

Info: 00020000 ( 0%): Programming  

Info: 

Info: Programmed 33KB +31KB in 1.5s (42.6KB/s)  

Info: Did not attempt to verify device contents 

Info: Leaving target processor paused 

 

 

 

 

the "infromation" content in flash programmer 

 

 

INFO: Generating shell script of launched commands. 

INFO: Generated shell script: E:\qiaodong\altera\SF-CY3\SF_CY3_DVD\prj\ex2\script\flash_programmer.sh 

 

 

 

 

the "problems" content in flash programmer 

WARNING: Obtaining system ID information for selected processor 

 

 

 

 

 

 

 

 

software codes:# include "alt_types.h"# include "altera_avalon_pio_regs.h"# include "sys/alt_irq.h"# include "system.h"# include <stdio.h># include <unistd.h> 

void delay(void); 

 

 

 

 

int main(void) 

while(1) 

IOWR_ALTERA_AVALON_PIO_DATA(PIO_BASE,0x1); 

delay(); 

IOWR_ALTERA_AVALON_PIO_DATA(PIO_BASE,0x0); 

delay(); 

return 0; 

 

 

 

 

//delay function 

void delay(void) 

alt_u32 i =0; 

while(i < 100000) 

i++; 

 

 

 

 

 

 

1. is the download success or not? 

2. if the download success, why the nios does not run?(the led not blink) 

3. if the download failed, how can i do? 

 

 

 

 

thanks!
0 Kudos
7 Replies
Altera_Forum
Honored Contributor I
56 Views

Hello, 

 

You are downloading your program into EPCS4. So after downloading, you need to apply power cycle to board ( power off and then power on ) in order to boot FPGA from that EPCS memory. Are you checking after applying power cycle to board?  

 

Cheers, 

Bhaumik
Altera_Forum
Honored Contributor I
56 Views

yes, i power off and then power on  

the led does not blink
Altera_Forum
Honored Contributor I
56 Views

BTW: i use M25P40 instead of EPCS4

Altera_Forum
Honored Contributor I
56 Views

Hi, 

 

Maybe you can try to use Quartus II programmer to program the .sof and .elf files in .jic file format? You can refer to these solution link on the steps to generate the .jic file from .sof and .elf files.  

https://www.altera.com/support/support-resources/knowledge-base/solutions/rd04112006_450.html 

https://www.altera.com/support/support-resources/knowledge-base/solutions/rd10132010_126.html 

 

Then you can refer to AN370 on how to program the .jic file. The Quartus II programmer will tell if the programming is successful or fail. 

https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/an/an370.pdf
Altera_Forum
Honored Contributor I
56 Views

thanks! 

i try to generate the .jic file 

when i use "sof2flash --epcs --input=ex2.sof --output=hw.flash --verbose" the command shell tell me "please supply an offset where you would like your sof located <--offset>" 

so i use "sof2flash --epcs --input=ex2.sof --output=hw.flash --verbose --offset=0x0 "(i do not know whether offset=0 is right) 

then the hw.flash file is generated 

 

then i use "elf2flash --ecps --base=0x0 --end=0x7ffff" --after=hw.flash --input=test2.elf --output=sw.flash"(0x7ffff is the size of M25P40 ) 

then the sw.flash file is generated, but its size is 1Kb and content is 

"S00600002D454C3B 

S70500000000FA" 

i do not think it is right, so i think the base and then end address may not refer to M25P40, so i change them to base and end of EPCS/EPCQx1 Serial Flash Controller in Qsys, that is 0x01001000 0x010017ff 

then i use "elf2flash --ecps --base=0x01001000 --end=0x010017ff" --after=hw.flash --input=test2.elf --output=sw.flash" 

then the command shell tell me 

"elf2flash: Boot copier file name required 

elf2flash: Error generating Flash file, exiting" 

 

i do not know where to find the Boot copier file....
Altera_Forum
Honored Contributor I
56 Views

 

--- Quote Start ---  

nios system download to epcs4 failed 

 

 

hi everyone, i want to download my project to epcs, i do the follows 

1.i build a nios project which includes sdram, EPCS/EPCQx1 Serial Flash Controller, and the reset vector memory of the nios is epcs_flash_controller_0.epce_control_port(of course there are sysid pll, and so on), i change the Dual-Purpose Pins to "Use as regular I/O"; 

2.the software project is very simple, just led the led blink; 

3.in the eclipse, i debug the project, and it works(the led blinking) 

4.i download the sof and elf file though flash programmer,  

5.when i finish the download, the flash programmer did not tell me the download is failed, but the led is not blinking, so at least the nios did not run. 

 

 

 

 

the "processing" content in flash programmer 

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

Info: Info: Running Quartus II 32-bit Convert_programming_file 

Info: Info: Command: quartus_cpf --no_banner --convert --device=EPCS128 --option=E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.opt E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex3/ex2.sof E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.pof 

Info: Info (210033): Memory Map File E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.map contains memory usage information for file E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.pof 

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

Info: Info: Peak virtual memory: 185 megabytes 

Info: Info: Processing ended: Tue Jun 16 13:44:49 2015 

Info: Info: Elapsed time: 00:00:01 

Info: Info: Total CPU time (on all processors): 00:00:01 

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

Info: Info: Running Quartus II 32-bit Convert_programming_file 

Info: Info: Command: quartus_cpf --no_banner --convert E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.pof E:/qiaodong/altera/SF-CY3/SF_CY3_DVD/prj/ex2/flash/ex2_epcs_flash_controller_0.rpd 

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

Info: Info: Peak virtual memory: 180 megabytes 

Info: Info: Processing ended: Tue Jun 16 13:44:51 2015 

Info: Info: Elapsed time: 00:00:01 

Info: Info: Total CPU time (on all processors): 00:00:01 

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

Info: Resetting and pausing target processor: OK 

Info: Reading System ID at address 0x00012010: verified 

Info: 

Info: : Checksumming existing contents  

Info: 

Info: 00000000 : Verifying existing contents  

Info: 

Info: 00010000 : Verifying existing contents  

Info: 

Info: 00020000 : Verifying existing contents  

Info: 

Info: 00000000 : Reading existing contents  

Info: 

Info: 00010000 : Reading existing contents  

Info: 

Info: 00020000 : Reading existing contents  

Info: 

Info: Checksummed/read 51kB in 1.4s  

Info: 

Info: 00000000 ( 0%): Erasing  

Info: 

Info: 00010000 (33%): Erasing  

Info: 

Info: 00020000 (66%): Erasing  

Info: 

Info: Erased 192kB in 1.6s (120.0kB/s)  

Info: 

Info: 00000000 ( 0%): Programming  

Info: 

Info: 00010000 (33%): Programming  

Info: 

Info: 00020000 (66%): Programming  

Info: 

Info: Programmed 142KB +50KB in 4.6s (41.7KB/s)  

Info: Did not attempt to verify device contents 

Info: Leaving target processor paused 

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

Info: Resetting and pausing target processor: OK 

Info: Reading System ID at address 0x00012010: verified 

Info: 

Info: : Checksumming existing contents  

Info: 

Info: 00020000 : Verifying existing contents  

Info: 

Info: 00020000 : Reading existing contents  

Info: 

Info: Checksummed/read 32kB in 0.8s  

Info: 

Info: 00020000 ( 0%): Erasing  

Info: 

Info: Erased 64kB in 0.5s (128.0kB/s)  

Info: 

Info: 00020000 ( 0%): Programming  

Info: 

Info: Programmed 33KB +31KB in 1.5s (42.6KB/s)  

Info: Did not attempt to verify device contents 

Info: Leaving target processor paused 

 

 

 

 

the "infromation" content in flash programmer 

 

 

INFO: Generating shell script of launched commands. 

INFO: Generated shell script: E:\qiaodong\altera\SF-CY3\SF_CY3_DVD\prj\ex2\script\flash_programmer.sh 

 

 

 

 

the "problems" content in flash programmer 

WARNING: Obtaining system ID information for selected processor 

 

 

 

 

 

 

 

 

software codes:# include "alt_types.h"# include "altera_avalon_pio_regs.h"# include "sys/alt_irq.h"# include "system.h"# include <stdio.h># include <unistd.h> 

void delay(void); 

 

 

 

 

int main(void) 

while(1) 

IOWR_ALTERA_AVALON_PIO_DATA(PIO_BASE,0x1); 

delay(); 

IOWR_ALTERA_AVALON_PIO_DATA(PIO_BASE,0x0); 

delay(); 

return 0; 

 

 

 

 

//delay function 

void delay(void) 

alt_u32 i =0; 

while(i < 100000) 

i++; 

 

 

 

 

 

 

1. is the download success or not? 

2. if the download success, why the nios does not run?(the led not blink) 

3. if the download failed, how can i do? 

 

 

 

 

thanks! 

--- Quote End ---  

 

 

Have you fixed this problem, I face same here, Need your help :)
Altera_Forum
Honored Contributor I
56 Views

hi phongvd2 

i already give up using nios. 

1. i suggest use mcu(stm32 for example) +fpga instead of nios in FPGA 

2.if you are chinese, to solve this problem, you can visit &#40657;&#37329; forum to find answers
Reply