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++
12600 Discussions

global pointer relative address out of range

Altera_Forum
Honored Contributor II
1,008 Views

"Object/null_driver.o(.text+0x18): global pointer relative address out of range" 

anyone knows how to modify generated.x file to fix http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/rolleyes.gif problem? 

Is this a compiler bug? I have read  

 

http://www.niosforum.com/forum/index.php?a...t=st&f=17&t=524 (http://www.niosforum.com/forum/index.php?act=st&f=17&t=524

and 

http://www.niosforum.com/forum/index.php?a...t=st&f=17&t=609 (http://www.niosforum.com/forum/index.php?act=st&f=17&t=609)  

 

is Nios II 1.01 release out yet?  

 

 

Thanx in advance for all the help
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
250 Views

1.01 (also called 1.0 SP1) is out now, and 1.1 will be available very soon. 

 

What is at address .text+0x18 in your code (link with --noinhibit-exec and look in the objdump file to find out)? Also, what is the source code which triggers the warning trying to do?
0 Kudos
Altera_Forum
Honored Contributor II
250 Views

Hi, 

 

 

I saw the same problem on a design of mine, when trying to use some variables in onchip ram and others in external SRAM. Because the the difference in addresses is too big, I got the same error.  

 

till now I had to put them all toghether in SRAM. And I use already 1.0 SP1. 

 

According to me, the compiler should be aware of the fact the address is not matching the criteria for the global pointer trick, and should swap to another system of loading the variabele.  

 

I think for accessing internal RAM (it is in the very low part of the address range), also one instruction is enough to load the address (< 65536). 

 

Stefaan
0 Kudos
Reply