Forum Discussion
Altera_Forum
Honored Contributor
16 years agoFail to Boot Software from EPCS16
Hi,
I have made a simple custom system with a EP3C16Q240, EPCS16,SDRAM,an AS connector,a JTAG connector and a 50Mhz system clock in which MSEL[0:2]=[010],VCCIO=3.3V.The SOPC contains a cpu with reset vector=EPCS_controller and exception vector=sdram,an 8k on chip ram,an 8k on rom,an EPCS_controller with base address 0x00000000,a jtag_uart,a system ID,a sdram conytoller,a test_uart,a 8bit pio. What I want is to write HW and SW into EPCS16 and,after power on,the system can load SW into sdram from EPCS16,and then run the SW automatically. Now the .sof file .can be written into EPCS16 and work well.But When writing .elf into EPCS16 using IDE's flash programmer the IDE said: No EPCS layout data - looking for section [EPCS-000000] Unable to use EPCS device Leaving target processor paused After searching the Altera's mysupport and forum I found nothing to solve the "[EPCS-000000]" problem,so I tried to use elf2flash to solve it.I did the following: 1) Convert SOF to Flash sof2flash --epcs --input=MyNios.sof --output=hw.flash --quiet 2) Convert ELF to Flash elf2flash --epcs --after=hw.flash --input=MyLed.elf --output=sw.flash --boot=epcs_controller_boot_rom.flash 3) Concatenate cp hw.flash hw_sw.flash cat sw.flash >> hw_sw.flash 4) Create HexFile nios2-elf-objcopy --input-target srec --output-target ihex hw_sw.flash hw_sw.hex 5) Convert hex to jic quartus ii->file->Convert Programming Files: Programming file type: JTAG Indirect Configuration File(.jic) Configuration device: EPCS16 File name: hw_sw.jic Input files to convert: Flash Loader(EP3C16),Hex_Data(Properties=Absolute addressing,Start Address=0x00000000,hw_sw.hex) Finally the jic file(hw_sw.jic ) was written into epcs using programmer utility of quartus ii by the JTAG connector.Unfortunately the SW did not work while the HW(.sof ffile) worked well.But when "run as hardware" in IDE the SW worked well even though the SW would not work after cycle powering on the board. My questions are: 1. What may be the reason leading to "[EPCS-000000]" ? 2. Is there any person who came across the "[EPCS-000000]" and solved it? 3. Are the above 5 steps correct? Had the SW been written into EPCS16 once the jic was programmed ok? 4. Further more why the SW did not work? Thanks in advance. Liu Jiangning14 Replies
- Altera_Forum
Honored Contributor
ealonso, which EPCS device do you have? What type of hardware are you using?
Have you enabled seral configuration in Quartus? For example see the relevant lines in my project .qsf file: set_global_assignment -name STRATIXII_CONFIGURATION_DEVICE EPCS64 set_global_assignment -name STRATIXII_CONFIGURATION_SCHEME "ACTIVE SERIAL" Do you specified the correct address? (--epc --base= option in nios2-flash-programmer) Jens - Altera_Forum
Honored Contributor
Hi, LiuJN,
I have the same problem but I don't know how to solve. My design has an epcs_controller into sopc and connected to nios. This controller is connected to fpga signals as decribed in "EPCS Device Controller Core" (Embedded peripherasl document)(DATA0, ASCO, DCLK, FLASH_nCE) but when i try to dowload file with nios2-flash-programmer it fails with "No EPCS layout data - looking for section [EPS-00000]". Can you explain how to you solved your problem? Or anyone can help me? Perhaps do I need extra componets into quartus design? Thanks - Altera_Forum
Honored Contributor
Thank you,Jens.I have solved the problem by my self after added an instance of epcs_controller into top level.
- Altera_Forum
Honored Contributor
Do you have a solution meanwhile?
May be I can help. I'm using StratixII and EPCS64. With the following commands I programm the EPCS. # load SOF nios2-configure-sof --cable='USB-Blaster [USB-0]' my_hw_design.sof # generate EPCS images sof2flash --epcs --input=my_hw_design.sof --output=my_hw_design.flash elf2flash --epcs --after=my_hw_design.flash --input=my_firmware.elf --output=my_firmware.flash # flash EPCS first with FPGA configuration nios2-flash-programmer --cable='USB-Blaster [USB-0]' --epcs --base=0x21000 my_hw_design.flas # flash EPCS with Nios firmware nios2-flash-programmer --cable='USB-Blaster [USB-0]' --epcs --base=0x21000 my_firmware.flash If you do so you didn't need the quartus programmer and conversion of programming files in Quartus. Cyclone3 has 4 MSEL pins, you set just 0:2 it this correct? For the [EPCS-000000] problem I have just an idea. Some serial configuration devices (if they not original from Altera) need a description of their structure. Therefore you need a file called "nios2-flash-override.txt" in the C:\altera\72\nios2eds\bin\ directory. I have attached an examle file for EPCS128. Jens