Forum Discussion
Altera_Forum
Honored Contributor
14 years agoSorry, I don't know anything about mmu-linux, since I never used it.
For normal Nios application, a simple method is using the __attribute__ directive after the function/variable definition you want to place in a specific memory. For example, if your code defaults to onchip_ram and you want function ext_function to be mapped to ext_sdram, you define it: int ext_function(int param) __attribute__ ((section (".ext_sdram"))); This is convenient if you only need to move a few functions to the alternate memory device. If you need something more advanced (i.e. remapping a whole library module or all symbols of a set of .c files), you'd better use a custom linker script file. In your case you need to move symbols to sdram but you also need to specify where, in order to avoid overlap, as I said before. So I believe the linker script method is mandatory.