Hallo,
ich kämpfe im Moment noch mit einem ersten fnordlicht. Der Hardwareaufbau war problemlos. Das Aufspielen des Bootloaderes und der Firmware bringt mich dagegen fast zum verzweifeln.
Ausgangsbasis ist das fnordlicht-0.2 Archiv von www.lochraster.org, Vorgehensweise lt http://wiki.koeln.ccc.de/index.php/U23_2005/Fnordlicht_quickstart_howto
1. Problem make install-bootlader ... bricht mit folgender Meldung ab:
..... Linking: main.elf avr-gcc -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.o -I/usr/local/avr/include -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o uart.o lowlevel.o --output main.elf -Wl,-Map=main.map,--cref -lm -Wl,--section-start=.text=1800 /usr/local/avr/lib/gcc/avr/3.4.6/../../../../avr/bin/ld: crtm8.o: No such file: No such file or directory make[1]: *** [main.elf] Error 1 make[1]: Leaving directory `/projects/fnordlicht/fnordlicht-0.2/boot/v0_7' make: *** [bootloader.hex] Error 2
Also /usr/local/avr/lib/avr4/crtm8.o nach boot/v0_7 kopiert erneut make install-bootloader aufgerufen: .... Linking: main.elf avr-gcc -mmcu=atmega8 -I. -gstabs -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.o -I/usr/local/avr/include -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o uart.o lowlevel.o --output main.elf -Wl,-Map=main.map,--cref -lm -Wl,--section-start=.text=1800 /usr/local/avr/lib/gcc/avr/3.4.6/../../../../avr/bin/ld: cannot find -lm make[1]: *** [main.elf] Error 1 make[1]: Leaving directory `/projects/fnordlicht/fnordlicht-0.2/boot/v0_7' make: *** [bootloader.hex] Error 2
Ok, libm.a gibts in 4 Versionen bei mir [root@localhost fnordlicht-0.2]# find /usr/local/ -name libm.a /usr/local/avr/lib/avr3/libm.a /usr/local/avr/lib/avr5/libm.a /usr/local/avr/lib/avr4/libm.a /usr/local/avr/lib/libm.a
Probieren wir mal die avr4 Variante -> im boot/v0_7/makefile die LDFLAGS um einen entsprechenden Eintrag erweitert (-L /usr/local/avr/lib/avr4) und los gehts
Ok, jetzt konnte ich den Bootloader brennen.
zur Kontrolle mal "meine" md5 checksumme vom bootloader [root@localhost fnordlicht-0.2]# md5sum bootloader.hex 4f10ca5f9ffadf861fa4feffb87d4426 bootloader.hex
Anmerkung: Abgesehen von den genannten Problemen, ist der Aufwand bis es mit dem Programmieren losgehen kann doch enorm (avr-gcc installieren usw.) Wäre es nicht hilfreich die entsprechenden binaries ebenfalls zu hinterlegen, damit man einfach durchstarten kann?
2. Problem make install-fnordlicht ... bricht ab mit
Connecting to programmer: . Found programmer: Id = "AVRBOOT"; type = S Software Version = 0.7; No Hardware Version given. Programmer supports auto addr increment. Programmer supports buffered memory access with buffersize=64 bytes.
Programmer supports the following devices: Device code: 0x76
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9307 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: reading input file "fnordlicht.hex" avrdude: input file fnordlicht.hex auto detected as Intel Hex avrdude: writing flash (3268 bytes):
Writing | avrdude: error: programmer did not respond to command: write block make: *** [prog-serial-fnordlicht] Error 1
Hier weiss ich im Moment nicht weiter. Die Kommunikation zwischen PC und Atmel schein ok zu sein, da er oben korrekt "AVRBOOT" über mittelt bzw. die Tests mit screen entweder "bababa..." oder "bp" liefern je nach Jumperstellung.
Irgendwelche Ideen?
ThoMo
P.S.: Laut Doku wäre als nächstes make install-eeprom dran, das Target gibt es aber garnicht.