Forum Discussion

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

a light gui compile errors!Nios IDE Bug?

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?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.