`.text' will not fit in region `text' during compile

I wnet back through the configuration tool to add the diisplay information for my board rather than try and add the info myself. Now when I compile the code I get this message. Once again, not a programmer - no clue how to resolve. Help appreciated.

Full text of errrors:
Arduino: 1.6.9 (Windows XP), Board: "Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

c:/program files/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: C:\DOCUME~1\John\LOCALS~1\Temp\build1d76ff8a31b0f78df26120a58e13e379.tmp/Repetier.ino.elf section `.text' will not fit in region `text'

c:/program files/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: region `text' overflowed by 7708 bytes

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Sanguino.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


  • With 8 bit CPU you can only address 64K of data. If you have display with all languages selected, that section gets too big. Deselect some languages and it should compile fine.
  • "Should" is the key word here and of course another problem pops up. I went back through the configurator and removed all the languages except English. Now when I compile I get:

    collect2.exe: error: ld returned 5 exit status

    Using library SPI at version 1.0 in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SPI
    exit status 1
    Error compiling for board Sanguino.

  • Apparently there is a problem with the ld.exe in IDE 1.6.x when run on WinXP. By using the ld.exe from 1.0.6 it compiles just fine.
    Next question - again pardon my complete ignorance.
    Is the firmware loaded to the chip via the USB interface? The Arduino ISP is not needed for that step?
    I'm getting the old can't sync with the chip error trying to upload the firmware via the USB. I'll change the upload speed to see if there is a mismatch there.
  • Normally you use the sanguino bootloader to upload the file. An ISP is an alternative if you have one. Then you connect the iSP to the 2x3 pin socket on the board to upload it. That is also the way to update bootloaders.
  • Thank you.I finally determined (guessed is more accurate) that the firmware file that came with the original printer was a dump of the bootlooader and hex file for the printer. Did a standard "Burn Bootloader after changing the file name in the boards.txt file to that hex file. Everything seems to be working now.
Sign In or Register to comment.