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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Reading Linker script variables in C source code

Altera_Forum
Honored Contributor II
1,182 Views

Hi Every one!! 

 

 

I am using the NIOS II IDE 6.1simulator. 

I want to read the linker defines in C.(using variables from generate.x file and access them in the C source code) 

 

This is the format I tried... 

printf("\n DDR SDRAM 0 : %08X", &__alt_mem_ddr_sdram); 

 

I tried to execute the code on the simulator.But the following error is encountered for all the variables in the logical sections of RAM.(.text,.rodata,rwdata etc..) 

Eg. 

Unable to reach &__alt_mem_ddr_sdram(at 0x00000000) from the global pointer (at 0x0401a8a4) because the offset (-67217572) is out of the allowed range, -32678 to 32767.  

 

Let me also know if the format is correct.  

Awaiting your response. 

 

Regards, 

samira
0 Kudos
0 Replies
Reply