Altera_Forum
Honored Contributor
9 years agoNo EPCS Registers Found
Sorry for the length, here is some background.
I have built different custom boards with a Cyclone III in Quartus 12.1 sp1 and all worked perfectly. It included a Serial Flash (Micron 25P16) for booting the HW from and a CFI chip (Micron M29W160) on a tri-state with some SRAM for booting the SW from. The CFI chip had a reset vector of 0x00 and the SRAM was set up as the exception vector. This was in a Nios II processor from quartus 12.1 sp1. From the NIOS II command shell, I would convert the sof to flash and program the Serial Flash with the HW codesof2flash --epcs --input=xxx.sof --output=xxx.flash nios2-flash-programmer --epcs --base=0x00602000 xxx.flash then I would convert the elf to flash and program the CFI with the nios SW codeelf2flash --base=0x00000000 --end=0x00200000 --reset=0x0 --input=xxx.elf --output=xxx_cfi.flash --boot="C:/altera/12.1sp1/nios2eds/components/altera_nios2/boot_loader_cfi.srec" nios2-flash-programmer --base=0x00000000 --override=flash-override.txt --width=8 xxx_cfi.flash" --debug --erase-all This all worked wonderfully. Now I designed a board with a Cyclone V in Quartus 15.1 with a Serial Flash (Micron 25P64) for booting the HW from and a CFI chip (cypress S29GL064) on a tri-state with some SRAM for booting the SW from. I set up the reset and exception vectors the same as before. I have tried both the new Nios II processor and the classic version and I have tried both the new EPCS controller and the legacy EPCS controller. I saw a thread that said to use the Nios II/f and I am using that but I can not get it to work from the NIOS II command shell. when I perform a nios2-configure-sof, it loads the sof and runs it. When I check with a jtagconfig -n, it shows a nios system running. From the NIOS II command shell, I would convert the sof to flash and program the Serial Flash with the HW code just as before with different base address. sof2flash --epcs --input=xxx.sof --output=xxx.flash nios2-flash-programmer --epcs --base=0x01000000 xxx.flash then I would convert the elf to flash and program the CFI with the nios SW code with different size CFI flash. elf2flash --base=0x00000000 --end=0x0x00800000 --reset=0x0 --input=xxx.elf --output=xxx_cfi.flash --boot="C:/altera/15.1/nios2eds/components/altera_nios2/boot_loader_cfi.srec" nios2-flash-programmer --base=0x00000000 --override=flash-override.txt --width=8 xxx_cfi.flash" --debug --erase-all The programming of the serial flash, says it can not find the EPCS registers and I have confirmed that the base address is correct. The programming of the CFI with the SW says there is no CFI table either. I created a flash-override.txt but I don't know if it is correct for the cypress S29GL064. I ran a --debug and saw a bunch of info for the CFI but I am not sure what it all means. This is what I wrote for the override file from what i got from the datasheet. [FLASH-98-98]# keyword FLASH followed by manufacturer ID and Device ID# These ID values can be found in three ways:# - by consulting the flash memory device's data sheet.# - by using the "autoselect" command# - by running nios2-flash-programmer --debug CFI[0x20] = 0x51 CFI[0x22] = 0x52 CFI[0x24] = 0x59 CFI[0x26] = 0x02 CFI[0x28] = 0x00 CFI[0x2A] = 0x40 CFI[0x2C] = 0x00 CFI[0x2E] = 0x00 CFI[0x30] = 0x00 CFI[0x32] = 0x00 CFI[0x34] = 0x00 However, it doesn't seem to work. is it the same issue in the nios command shell for programming the cfi as i am having for the programming of the serial flash? I tried creating a .jic file of the sof and use quartus programmer, the HW code loads into the serial flash and a power cycle will boot into the HW code. why will the loading of the hw code not work from the nios command shell but it will from quartus programmer?I tried creating a .hex file of the xxx_cfi.flash after it was converted from the xxx.elf file. I then tried converting that to a .jic and using the quartus programmer with a CFI_64Mb attached to my Cyclone V and programming it but it locks up quartus every time. I am at a loss and need help.