Forum Discussion
Altera_Forum
Honored Contributor
20 years ago --- Quote Start --- originally posted by shachris23@Jan 14 2006, 03:37 AM it does work when i link to a dummy application. however, is there a way to increase the size though for global pointer though? because we tried compiling and linking the same project under fedora core 4 with the gcc version 3.4.1, and it linked in just fine.
thus, we suspect this is a nios-ii-specific problem?
what does everybody think?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12190)
--- quote end ---
--- Quote End --- Yes, because the Nios compiler uses a register to speedup data access. In general you cannot increase the amount of GP-relative memory, but there are two ways: You can either - compile using the -G0 option or, - put your small data (global ints, global chars, ...) inside a struct, or allocate them in another section... you can try something like
int foo __attribute__ ((section (".data"))) = 57;
int bar __attribute__ ((section (".bss"))); // initialized to 0 the section attribute must stay both in the declaration and on the definition of the variables. There is also a section about that in the ERIKA Enterprise manual, section 4.8.4, available for free at the evidence literature page (http://www.evidence.eu.com/nios2/literature.asp) bye Paolo