Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

Unable to reach (null) from global pointer - multiple onchip rams for applications

Altera_Forum
Honored Contributor II
1,246 Views

Hi, 

 

the linker gives me the following error: 

 

HAL/src/alt_main.c:154: warning: Unable to reach (null) (at 0x00500004) from the global pointer (at 0x0017f2b4) because the offset (3673424) is out of the allowed range, -32678 to 32767.  

 

I first got this error after splitting the application onchip RAM in 3 pieces (required to do so in order to make use of the MLAB ressources) so I assume it has something to do with it. 

The linker regions have been correctly assigned to these RAMs (screenshot included in attachment). 

 

https://alteraforum.com/forum/attachment.php?attachmentid=13998&stc=1  

 

Can someone give me a hint how I could get rid of this problem? 

 

Thanks!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
349 Views

It looks like the linker is trying to use relarive addressing but your bss and text_data on chip memories are too far away in the address space. I would first try and manually edit the addresses of your onchip memories so that they are contiguous in the memory space, and if this is not enough write a custom link script that declares a single space including all the onchip memories and that maps all the sections (except heap and stack) to that space.

Reply