我一开始运行示例程序出现:make -s all
make[1]: *** No rule to make target
`/cygdrive/c/altera/kits/nios2_60/components/altera_hal/HAL/src/alt_alarm_start.c',
needed by `obj/alt_alarm_start.o'. Stop.
make: *** [system_project] Error 2
Build completed 的错误, 我按照别人的指示;在当前目录下再新建一个例程,代码就是示例程序里的;编译出现**** Incremental build of configuration Debug for project button ****
make -s all Compiling hello_led.c... ../hello_led.c: In function `button_irq': ../hello_led.c:27: warning: unused variable `iRet' ../hello_led.c: In function `main': ../hello_led.c:82: warning: implicit declaration of function `alt_irq_register' Linking button.elf... /cygdrive/e/altera/kits/nios2_60/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: region onchip_memory_0 is full (button.elf section .text). Region needs to be 59440 bytes larger. /cygdrive/e/altera/kits/nios2_60/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: region onchip_memory_0 is full (button.elf section .rwdata). Region needs to be 5308 bytes larger. /cygdrive/e/altera/kits/nios2_60/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .rodata [02000000 -> 020006d7] overlaps section .text [02000000 -> 0200f82f] /cygdrive/e/altera/kits/nios2_60/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .rwdata [020006d8 -> 020024bb] overlaps section .text [02000000 -> 0200f82f] /cygdrive/e/altera/kits/nios2_60/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/bin/ld: section .bss [02000000 -> 02000213] overlaps section .text [02000000 -> 0200f82f] /cygdrive/e/altera/kits/nios2_60/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.1/../../../../nios2-elf/lib/libc.a(sbrkr.o)(.text+0x14): In function `_sbrk_r': /build/nios2/bin/nios2-gnutools/src/newlib/newlib/libc/reent/sbrkr.c:59: Unable to reach errno (at 0x02000000) from the global pointer (at 0x0200a430) because the offset (-42032) is out of the allowed range, -32678 to 32767.
collect2: ld returned 1 exit status make: *** [button.elf] Error 1 Build completed 这样的错误,在线等答案,望高人给与指点为感! 作者: kzw 时间: 2008-5-12 14:33
region onchip_memory_0 is full,这个的提示是你的程序区已经溢出,是你把代码放到了on_chip中了。