Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by ziguowei@Nov 3 2006, 05:01 PM dear all,
i follow the web page--
http://nioswiki.jot.com/wikihome/operating...flashprogrammer (http://nioswiki.jot.com/wikihome/operatingsystems/flashprogrammer)
i want nios ii to boot from epcs device,so i do the folowing:
1.rebuild the kernel and get zimage_epcs_1102
2.in nios sdk shell:
elf2flash --input=zimage_epcs_1102 --output=zimage_epcs_1102.flash --location=0x00900800
--epcs --boot=$sopc_kit_nios2/components/altera_nios2/boot_loader_epcs.srec
nios2-flash-programmer --epcs --base=0x00900800 zimage_epcs_1102.flash
(0x00900800 is the base address of epcs controller in sopc builder)
(zimage_epcs_1102.flash is 2424 kb)
but, i get this:
using cable "usb-blaster [usb-0]", device 1, instance 0x00
resetting and pausing target processor: ok
checksummed/read 1024kb in 140.2s
erased 1024kb in 15.4s (66.4kb/s)
programmed 970kb +54kb in 128.8s (7.9kb/s)
did not attempt to verify device contents
leaving target processor paused
anyone can give me some hints?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=19136)
--- quote end ---
--- Quote End --- The programming is OK. The flash file is srec hex format, and take about twice the real binary size. If you want nios2 to boot from epcs, you have to run sopc builder, assign reset vector to epcs controller. then regenerate hardware and compile in quartus. Generate new sof. Next you can rebuild kernel, and program the flash. You MUST include sof in the epcs flash, as you DID NOT include it in your example. DO EXACTLY the steps in WIKI. If you use EPCS flash, find out and change the sof path and epcs base below. on nios2 sdk shell, cd arch/nios2nommu/boot# Creating .flash file for the FPGA configuration sof2flash --epcs --input=$SOPC_KIT_NIOS2/examples/verilog/niosII_cycloneII_2c35/standard/standard.sof --output=standard.flash# Programming flash with the FPGA configuration nios2-flash-programmer --epcs --base=0x02200000 standard.flash# Creating .flash file for the project elf2flash --epcs --after=standard.flash --input=zImage --output=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_epcs.srec# Programming flash with the project nios2-flash-programmer --epcs --base=0x02200000 epcs_controller.flash