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

a light gui compile errors!Nios IDE Bug?

Altera_Forum
Honored Contributor II
1,010 Views

hi,i compile a zlggui under nios2 IDE(ver9.0),it comes on the error message: 

Unable to reach disp_color (at 0x00000000) from the global pointer (at 0x00191328) because the offset (-1643304) is out of the allowed range, -32678 to 32767. 

 

But the same code under Keil(C51) and ADSv1_2(ARM) has no errors,Does NiosIDE have this Bug?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
365 Views

Anyone has time,help me to do a try!thanks 

 

how to post a accessory to this forum? I want to upload the source code.
0 Kudos
Altera_Forum
Honored Contributor II
365 Views

Hello I'm having the same problem on nii.ver 8.0. I'm still not able to solve it myself but I found that in the following documentation: 

http://www.altera.com/literature/hb/nios2/n2sw_nii52004.pdf 

On page 42 It suggests that you might be using more than the 64K memory for small global pointers. try the -G 4 option in Project -> Properties -> ... 

-> C/C++ Build -> Tool Settings -> General->Compiler Options -> -G 4. 

That will allocate only pointers of up to 4B in the small global pointer region. 

 

As for myself I think the problem has to do with some very large Structs I use for holding frames and trying to pass a global pointer to them. I may try to pass smaller chunks of data If I don't solve the issue. Hope this helps, Have a great week.  

regards, 

Jonathan.
0 Kudos
Reply