Forum Discussion
Altera_Forum
Honored Contributor
20 years agoI had the same problem with the 256mByte thing. My local FAE gave me the following reply when I asked about this issue. Note however that this was back in Sep 05, so it may be out of date.
"This error is due to an issue with the global pointer and the linker script used in the Nios toolchain. Because the global pointer is only 16 bits long, it can only address a maximum of 256Mb of memory. if the instruction master is connected to memory greater than 256Mb, it flags this error. the global pointer is used to point to data located in the bss, .sbss, and .text reigons. The work around is an unsupported feature in Nios 2, called allow_full_address_range, located in the /components/altera_nios2/class.ptf file, which overcomes the warning about crossing address boundaries. Using this, and ensuring your program code (.text .rodata .rwdata) are all located in the same 256Mb segment will allow you to have a Nios system with >256 Mb of SDRAM, and allow you to execute code and store large amounts of data in the same SDRAM component. (dynamic data stored on the heap can be greater than the 256Mb limit: you must ensure all pre-initialised variables and structs are within the 256Mb limit) you will also have to locate your stack within the 256Mb boundary too, using the following linker switches in the IDE -Wl,-defsym -Wl,__alt_data_end=_0x0000FFF0 __alt_data_end is the name of the linker variable used to position the top of stack, as used in the generated linker script file. if you alter this, you can use it as a custom linker script. I must stress the allow_full_address_range is an unsupported feature, and Altera wont support issues related to its use. (linker settings obviously not included in that!)" I hope this helps