создали свою плату с Cyclon II, sof - сгенерирован без ошибок, написал свою программу в IDE NIOS , компилируется нормально elf - есть. загружаю sof через jtag Quartus programmer всё нормально , под debug нормально запускается программа можно трассировать в принципе работает. однако nios flash programmer не может запрограммировать epcs flash только стирает. вот лог: ------------------------------------------------------------------------------------------------------------------------- #! /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
--------------------------------------------------------------------------------------------------- пробовал в своей программе писать в epcs используя : alt_write_flash(fd, 0, ibuf_epcs, 256) и читать обратно alt_read_flash(fd, 0, obuf_epcs, 256), блок записывается и при выкл. питания сохраняется, после запуска nios flash programmer таже область сбрасывается в 0xff, т.е. происходит только стирание страницы в epcs, иногда nios flash programmer удаётся полностью завершить процедуру однако данные при этом в epcs также не сохраняются происходит только стирание.
посоветуйте что посмотреть
|