Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12748 Discussions

NIOS II HAL question on memory size

Altera_Forum
Honored Contributor II
1,111 Views

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? 

 

thanx
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
400 Views

Hello, 

 

look at the linker file. There are symbols for the beginning and end of each memory block in your system. 

 

Dirk
0 Kudos
Altera_Forum
Honored Contributor II
400 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
400 Views

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
0 Kudos
Reply