Forum Discussion
Altera_Forum
Honored Contributor
11 years agoYou need two separate projects.
The first one is the bootloader which transfer data from SD card to the sdram and starts program execution. I think you plan to generate a hex file to be used as initialization file for onchip memory, so that the loader starts just after fpga configuration. The second project is the 'true' program which is supposed to run from sdram. In the nios project you need to link it in a memory section which resides at address SDRAM_0_BASE +0x00100000, since this is what you'll have after you have loaded code from sd card. The standard bootloader takes care to place all code sections in the right places, but in this case you do it manually, so the placement must be consistent with the linking process. This should not be difficult: my concern is rather on the fact the hex file generated from elf is really a 1:1 map of the final memory configuration; I don't know if you need to initialize any extra data.