Board logo

标题: niosII 报错:全局指针偏移出范围,请问应如何修改 [打印本页]

作者: zzkeng    时间: 2008-11-19 11:52     标题: niosII 报错:全局指针偏移出范围,请问应如何修改

程序不多大
就那么几行
编译是居然出现了这种错误
高手执教以下
应该如何避免此类错误

make -s all includes
Compiling main.c...
Linking EP1C6_nios.elf...
/cygdrive/d/altera/80/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: region onchip_ROM is full (EP1C6_nios.elf section .text). Region needs to be 2868 bytes larger.
/cygdrive/d/altera/80/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: region onchip_RAM is full (EP1C6_nios.elf section .rwdata). Region needs to be 768 bytes larger.
/cygdrive/d/altera/80/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: address 0x4614 of EP1C6_nios.elf section .onchip_ROM is not within region onchip_ROM
obj/main.o(.text+0x34): In function `IRQ_init':
../my_function.h:40: Unable to reach edge_capture (at 0x00002020) from the global pointer (at 0x0000aab4) because the offset (-35476) is out of the allowed range, -32678 to 32767.

[注]edge_capture 为一全局变量






欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0