Forum Discussion
Altera_Forum
Honored Contributor
13 years agoI have switched to QSYS and it works fine. Nios boots from epcs. Using Terasic De0-nano.
BUT I think I have seen the exact same problem as reported here. The cure for my case is found in my notes from back then - listed below. There are information already mentioned in this thread but I list it all for completeness. But check out point 5 if it applies to you as well. That was the crucial point for my case at least. Regards Henning 1. In QSYS, make sure the EPCS device is accessible from both data and instruction port of NIOS!!! 2. Set the reset vector to the the BASE address of the EPCS device as seen from the NIOS in qsys builder. Offset is set to 0. See Figure 1. See also an458 and Figure 4 below. 3. When nios enters reset it excutes the rom code which is compiled into the epcs component interface. This code which is a little less than 1kB is boot code which reads the image from the epcs and puts it into the volatile ram as defined in the linker (See the bsp editor). The epcs interface is 2kB in total. The upper 1kB is used to command the flash. This information is important to remember when you prepare the boot image using the flash programmer: you should not include any boot code! 4. Make sure all the binary images are set to be located in volatile ram, as this invokes the boot copier if the ram in question needs initialization data. This is typically the .text, .rodata, .bss etc. 5. Ensure that log output to jtag port is NOT enabled in Eclipse build. This is setup in the Board Support Editor under Main->Settings->advanced->hal->LogPort (cost me 2 days lost work). The processor halts when it does not get handshake from the jtag-attached host device, and consequently it appears to not run. (at least that is what I think is happening because once it worked I lost interest in finding out what exactly was going on). It is probably also a good idea to remove jtag_uart as stdio, although it is seen to work anyway when not removing this in BSP editor. Anyway jtag-uart makes little sense when running stand-alone from flash. 6. In Board Support Editor under Main->Settings->advanced->hal->linker Remove the ticks marks in all the 5 options: Allow_code_at_reset, enable_alt_load etc. (Not sure what this does, but found this in an altera application note. In addition I am not sure if this will actually make a difference)