Hi. Curently I'm starting to work with WinAVR + Eclipse. I've read "region text is full" post on forum and I've downloaded plugin for WinAVR and installed in Eclipse. Second I've downloaded and created project with AVRButterfly application (http://www.siwawi.arubi.uni-kl.de/avr_projects/index.html). I've set Build options and one thing is not working: The Memory map sad that device ATmega169 has 0x2000 of flash instead of 0x4000. Here yu can see: -----------------------------------------start Memory Configuration Name Origin Length Attributes text 0x00000000 0x00002000 xr data 0x00800060 0x0000ffa0 rw !x eeprom 0x00810000 0x00010000 rw !x default 0x00000000 0xffffffff Linker script and memory map LOAD C:/pro/WinAVR/bin/../lib/gcc/avr/3.4.3/../../../../avr/lib/avr5/crtm161. o LOAD C:/pro/WinAVR/bin/../lib/gcc/avr/3.4.3/../../../../avr/lib/avr5\libm.a LOAD ./sources/ADC.o LOAD ./sources/BCD.o LOAD ./sources/LCD_driver.o LOAD ./sources/LCD_functions.o LOAD ./sources/RTC.o LOAD ./sources/button.o LOAD ./sources/dataflash.o LOAD ./sources/eeprom.o LOAD ./sources/eeprom169.o LOAD ./sources/main.o LOAD ./sources/test.o LOAD ./sources/timer0.o LOAD ./sources/usart.o LOAD C:/pro/WinAVR/bin/../lib/gcc/avr/3.4.3/avr5\libgcc.a LOAD C:/pro/WinAVR/bin/../lib/gcc/avr/3.4.3/../../../../avr/lib/avr5\libc.a LOAD C:/pro/WinAVR/bin/../lib/gcc/avr/3.4.3/avr5\libgcc.a -------------------------------------------end And here is the part of command line executing with avr-gcc: -------------------------------------------start Building file: ../sources/usart.c Invoking: AVR-GCC C Compiler avr-gcc -c -fmessage-length=0 -Wall -Wstrict-prototypes -ID:\eclipse\workspace\Butterfly\headers -IC:\pro\WinAVR\avr\include -mmcu=avr5 -minit-stack=__stack -D__AVR_ATmega169__ -Os -fshort-enums -fpack-struct -funsigned-char -funsigned-bitfields -std=gnu99 -g3 -osources/usart.o ../sources/usart.c Finished building: ../sources/usart.c Building target: Butterfly.elf Invoking: AVR-GCC C Linker avr-gcc -o Butterfly.elf -lm -Wl,-Map=Butterfly.map --cref --oformat=coff-avr -mmcu=avr5 ./sources/ADC.o ./sources/BCD.o ./sources/LCD_driver.o ./sources/LCD_functions.o ./sources/RTC.o ./sources/button.o ./sources/dataflash.o ./sources/eeprom.o ./sources/eeprom169.o ./sources/main.o ./sources/test.o ./sources/timer0.o ./sources/usart.o C:\pro\WinAVR\bin\..\lib\gcc\avr\3.4.3\..\..\..\..\avr\bin\ld.exe: region text is full (Butterfly.elf section .text) make: *** [Butterfly.elf] Error 1 make: Target `all' not remade because of errors. Build complete for project Butterfly ------------------------------------------end And here are options from Managed code properities of Project: --------------------------------------start COMPILER -fmessage-length=0 -Wall -Wstrict-prototypes -I"D:\eclipse\workspace\Butterfly\headers" -I"C:\pro\WinAVR\avr\include" -mmcu=avr5 -minit-stack=__stack -D__AVR_ATmega169__ -Os -fshort-enums -fpack-struct -funsigned-char -funsigned-bitfields -std=gnu99 -g3 LINKER -lm -Wl,-Map=$(@:%.elf=%.map) --cref --oformat=coff-avr -mmcu=avr5 -----------------------------------------END OK. So can someone tell me why is it happen? Thanks Bart.
First, this is supposed to be a German-language forum. Please use avrfreaks.net for English language. Second, don't use -mmcu=avr5 when linking. Use -mmcu=atmega169. Finally, I wouldn't trust a direct generation of coff-avr by the linker. I never tested that option, if it works, it works only incidentally. If you really need COFF, use avr-objcopy to convert it.
Thanks for answering in English either, but I think mikrokontrola forum is better than avrfreaks. Option -mmcu=atmega169 helps. All work fine now. Thanks again. See ya. Meaby my German will be better soon, so I could write messagess in German language. Bart.
> Meaby my German will be better soon, so I could write messagess > in German language. Good luck with that. ;-) I could only answer in Russian, or maybe a bit of Czech... These are the only Slavic languages I know.
Hallo! Anscheindend ein altes Problem, ist bei mir nun auch aufgetreten. Ich versuch e aber einen AT90USB1287 zu kompilieren. Ich bekomme ebenfalls den Fehler: ld: region text is full (gateway.elf section .text) Und das auch noch unter Linux mit Eclipse. Hat jemand eine Idee? Hier die compiler-ausgaben: ---------------------------start **** Build of configuration Debug for project gateway **** make -k all Building file: ../MyFunction_task.c Invoking: GCC C Compiler avr-gcc -I/usr/avr/include/ -O0 -g3 -Wall -c -fmessage-length=0 -mmcu=at90usb1287 -MMD -MP -MF"MyFunction_task.d" -MT"MyFunction_task.d" -o"MyFunction_task.o" "../MyFunction_task.c" ../MyFunction_task.c: In function ‘MyFunction_task’: ../MyFunction_task.c:112: warning: implicit declaration of function ‘Bluetooth_action’ ../MyFunction_task.c: At top level: ../MyFunction_task.c:148: warning: conflicting types for ‘Bluetooth_action’ ../MyFunction_task.c:112: warning: previous implicit declaration of ‘Bluetooth_action’ was here ../MyFunction_task.c: In function ‘Bluetooth_action’: ../MyFunction_task.c:149: warning: implicit declaration of function ‘WaitForEverythingSent’ Finished building: ../MyFunction_task.c Building target: gateway.elf Invoking: GCC C Linker avr-gcc -o"gateway.elf" ./MyFunction_task.o ./main.o ./power_drv.o ./scheduler.o ./usb_descriptors.o ./usb_drv.o ./usb_specific_request.o ./usb_standard_request.o ./usb_task.o ./wdt_drv.o /usr/lib/gcc/avr/4.2.1/../../../../avr/bin/ld: region text is full (gateway.elf section .text) ./MyFunction_task.o: In function `Bluetooth_action': /home/simeon/workspace/gateway/Debug/../MyFunction_task.c:149: undefined reference to `WaitForEverythingSent' make: *** [gateway.elf] Fehler 1 make: Das Target »all« wurde wegen Fehlern nicht aktualisiert. Build complete for project gateway ---------------------------ende
OK, habe den Fehler gefunden. Mein Programm IST zu groß. Habe mir das Makefile vom AVR-Studio angesehen und die Optimierungsoption -Os anstatt -O0 eingestellt. Jetzt hauts wunderbar hin.
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.