Forum Discussion
Altera_Forum
Honored Contributor
11 years agoRunning NIOS program from external SDRAM
Hi, How would one create or modify a linker script to get a Nios program to run from external SDRAM rather on on-chip RAM? I have created a Qsys system with a NIOS and SDRAM controller. The...
Altera_Forum
Honored Contributor
11 years agoThings work correctly when residing in on chip memory because the memory should be populated with code prior to reset and/or on power-up.
When using off chip SDRAM, you should locate your code in a non-volatile memory (flash of some sort) as "payload" for a boot loader that gets automatically programmed into flash when you're using the Nios II IDE and Nios II flash programmer. In this case, the reset address should be pointed at the flash memory. When the Nios II boots, it starts executing from the flash memory running the boot copier/loader which copies the code into SDRAM. When finished, it jumps to that code in SDRAM. Cheers, slacker