Showing results for 
Search instead for 
Did you mean: 
Valued Contributor III

problems with the global pointer



I have a project with three memories, one sram, one sram with back up and an On-Chip Memory. I'm using Interniche stack, superloop mode. 


When all code sections goes in th SRAMs, the compialtion i succesfull. However, I NEED to put .rwdata secion in the onchip memory. But with that setting I have the following linking error: 


/cygdrive/e/Raul/Proyectos/ProyectoComunicacion/Hardware/Version25/Progressive_CIII_V12/software/FinalEthernetPort/TCPTask.c:58: Unable to reach cticks (at 0x028426c0) from the global pointer (at 0x0301d20c) because the offset (-8235852) is out of the allowed range, -32678 to 32767. 


cticks it's a global variable. It's declared as a extern in the interniche library, and i'm defining it in one of my source files. 


Following to "NIOS Software Developer Handbook", Global Pointer Section, pag 161, I added the option "-G 4" but this it's not helping, I get exactly the same error :(. 


Does anybody knows how to deal with this problem?.
0 Kudos