Can I run my Nios II from program in SRAM or SDRAM, how?
Loading directly from an external ram is probably going to be more trouble than its worth, it may require hacking, I have not tried this and probably never will, I believe it is possible. Here we go:



You need to get the compiled code using one of the methods listed in the "Generic Nios II Booting Methods User Guide" document I think the .hex file looks the most promising.

Load the memory from the JTAG, this document describes how to write to memory and other avalon MM devices.

Point your reset memory vector in the NOIS processor to the boot address in your external ram.

Then your going to have to trigger a reset without resetting the external ram. This is the hack part, since I don't know your setup, your going to have to do this.

Good luck, sounds like a fun project. I'd try it out if I had the time, maybe I will someday (I've also ran into this problem, for me it was much less time consuming and cheaper to upgrade the FPGA, in fact if your developing you should almost always use the biggest fpga possible)

Here is another cool article on booting from an external processor