Forum Discussion
Altera_Forum
Honored Contributor
16 years agoi am using
#define Switches (volatile char *) 0x00003000 #define LEDs (char *) 0x00003010 int main(void) { while (1) { *LEDs = *Switches; } return(1); } which is same base addresses as assigned by the SOPC builder 1. I ran this application program using Altera Debug client and it was successful. I mean i could use switches t manipulate the LED's I took this program from the tutorials which come with the CD(DE2 board) 2. When i use NIOS II IDE i get Linking light.elf... /cygdrive/c/altera/90/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: region onchip_memory2_0 is full (light.elf section .text). Region needs to be 2932 bytes larger. /cygdrive/c/altera/90/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: region onchip_memory2_0 is full (light.elf section .rwdata). Region needs to be 664 bytes larger. /cygdrive/c/altera/90/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: section .rodata [00001020 -> 00001053] overlaps section .exceptions [00001020 -> 000011c7] /cygdrive/c/altera/90/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: section .rwdata [00001054 -> 00002297] overlaps section .exceptions [00001020 -> 000011c7] /cygdrive/c/altera/90/nios2eds/bin/nios2-gnutools/H-i686-pc-cygwin/bin/../lib/gcc/nios2-elf/3.4.6/../../../../nios2-elf/bin/ld: section .bss [00001020 -> 00001123] overlaps section .exceptions [00001020 -> 000011c7] /cygdrive/c/sopc_tutorial/software/light_syslib/Debug/liblight_syslib.a(alt_dev_llist_insert.o)(.text+0xdc): In function `alt_get_errno': /cygdrive/c/altera/90/nios2eds/components/altera_hal/HAL/inc/sys/alt_errno.h:81: Unable to reach errno (at 0x00001020) from the global pointer (at 0x0000a25c) because the offset (-37436) is out of the allowed range, -32678 to 32767. collect2: ld returned 1 exit status make: *** [light.elf] Error 1