Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

problems with the global pointer

Hello!

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?.
No RepliesBe the first to reply