Forum Discussion
Altera_Forum
Honored Contributor
21 years agoNIOS II HAL question on memory size
Looking in system.h, I see the define for SDRAM_BASE. There is no define, tho, for the size of SDRAM. In the old excalibur.h, there was a define for the base, end, and size. There used to be a nasys_data_mem_size also. How can I programmatically find the size of the SDRAM?
thanx3 Replies
- Altera_Forum
Honored Contributor
Hello,
look at the linker file. There are symbols for the beginning and end of each memory block in your system. Dirk - Altera_Forum
Honored Contributor
Thanks for the info, but I am a little lost. I cannot get my application I am porting from Nios to Nios II to build because all the changes. What is the extension of the linker file (.lnk?)? If it will not build, will it create the linker file?
thanx - Altera_Forum
Honored Contributor
The linker file is autogenerated, you can find it in the syslib dirs (AFAIR it's called generated.x). You can access these symbols from your code.
Dirk