Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
1,527 Views

ERROR while debug eclipse

hi everyone, 

i'm trying to print hello world on the lcd, the board is DE2, 

the compilation in quartos is succeed also the programmer, now i'm trying to build the project in Eclipse but it's failed and show me the next ERROR: 

 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: hello_world_lcd.elf section `.text' will not fit in region `onchip_memory2_0' 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: address 0x95d8 of hello_world_lcd.elf section `.rwdata' is not within region `onchip_memory2_0' 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: address 0xb428 of hello_world_lcd.elf section `.bss' is not within region `onchip_memory2_0' 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: address 0xb428 of hello_world_lcd.elf section `.onchip_memory2_0' is not within region `onchip_memory2_0' 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: address 0x95d8 of hello_world_lcd.elf section `.rwdata' is not within region `onchip_memory2_0' 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: address 0xb428 of hello_world_lcd.elf section `.bss' is not within region `onchip_memory2_0' 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: address 0xb428 of hello_world_lcd.elf section `.onchip_memory2_0' is not within region `onchip_memory2_0' 

c:/altera/13.0sp1/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: region `onchip_memory2_0' overflowed by 37928 bytes 

collect2: ld returned 1 exit status 

make: *** [hello_world_lcd.elf] Error 1 

 

is anyone know what can i do for solve it? 

thanks a lot!
0 Kudos
3 Replies
Highlighted
Honored Contributor I
160 Views

section `.text' will not fit in region - This indicates that your code is too big to fit in memory. Since it is on-chip ram, you are probably using the full C library that won't fit. You need to check the project options box to use the smaller C library. I don't remember the exact wording. You also need to delete the Debug and Release directories so the makefile will be regenerated. An ordinary clean won't do that.

0 Kudos
Highlighted
Honored Contributor I
160 Views

dear galfonz, 

i make a new project and have the same error... now there is no place to escape :) 

can you tell me just where can i find the project options box? and also where to delete the debug and release option?  

 

cheers!
0 Kudos
Highlighted
Honored Contributor I
160 Views

In the software build tools for eclipse, right click your bsp project and select properties from the pop up menu. Select "Nios II BSP Properties" in the box on the left. Check Small C library and Reduced device drivers. Leave the other options unchecked. Click OK. You could also use the BSP editor. 

 

It looks different in the 16.0 version. It looks like they fixed the problem with clean. Just clean your BSP and application projects and build again.