Code: Alles auswählen
program Project1;
var
es: ShortString = 'Ich liebe Lazarus !'; section '.eeprom';
// es: ShortString = 'Ich liebe Lazarus !';
begin
repeat
PORTB := byte(es[2]);
until False;
end.
Code: Alles auswählen
Projekt kompilieren, OS: embedded, CPU: avr, Ziel: Project1.elf: Erfolg, Hinweise: 2
Hint: Start of reading config file /home/tux/fpcupdeluxe_avr5/fpc/bin/x86_64-linux/fpc.cfg
Hint: End of reading config file /home/tux/fpcupdeluxe_avr5/fpc/bin/x86_64-linux/fpc.cfg
Projekt: Ausführen des Befehls nach: Exit code 1
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "Project1.hex"
avrdude: ERROR: address 0x810010 out of range at line 13 of Project1.hex
avrdude: read from file 'Project1.hex' failed
avrdude done. Thank you.
Code: Alles auswählen
avrdude -patmega328p -cusbasp -D -Uflash:w:Project1.hex:i
Nehme ich das section '.eeprom'; raus, wird anstandslos hochgeladen.
Nachtrag:
Durch dieses Problem hier: viewtopic.php?f=9&t=12985&p=115077#p115077 habe ich noch folgende Infos vom Compiler.
Probiert am ATtiny2313.
Mit .eeprom:
Code: Alles auswählen
Error: /home/tux/fpcupdeluxe_avr25/cross/bin/avr-embedded/avr-ld: /n4800/DATEN/Programmierung/Lazarus/Tutorials/Embedded/AVR/ATtiny2313/EEPROM_String_Test/Project1.elf section `.eeprom' will not fit in region `eeprom'
Code: Alles auswählen
Error: /home/tux/fpcupdeluxe_avr25/cross/bin/avr-embedded/avr-ld: /n4800/DATEN/Programmierung/Lazarus/Tutorials/Embedded/AVR/ATtiny2313/EEPROM_String_Test/Project1.elf section `.data' will not fit in region `data'
Code: Alles auswählen
Error: /home/tux/fpcupdeluxe_avr25/cross/bin/avr-embedded/avr-ld: /n4800/DATEN/Programmierung/Lazarus/Tutorials/Embedded/AVR/ATtiny2313/EEPROM_String_Test/Project1.elf section `.test' will not fit in region `data'