Altera_Forum
Honored Contributor
18 years agoReading Linker script variables in C source code
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