flash error at address 0x2
Pop quiz geeklings: see if you can figure out why Buffalo is an idiot in only 30 lines of output:
594% make flash
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega16 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega16 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega16 -c main.c -o main.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega16 -o main.bin usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.bin main.hex
./checksize main.bin
ROM: 2100 bytes (data=6)
RAM: 66 bytes
uisp -dprog=stk500 -dserial=/dev/ttyS0 -dpart=atmega16 –erase –upload –verify if=main.hex
Atmel AVR ATmega8 is found.
Uploading: flash
Verifying: flash
flash error at address 0x2: file=0x7b, mem=0x12
flash error at address 0x6: file=0xbc, mem=0x94
flash error at address 0x7: file=0x01, mem=0x00
…about a million more similar errors…
If you said “mike configured his microcontroller as an ATmega16 when he is obviously using an ATmega8” you are smarter than me.
So yes, at least 1 cause of these errors is specifing the right microcontroller. I edited my Makefile to use atmega8 instead of atmega16 and everything worked like a charm.
Hey Mike,
What are you going to be doing with the micro controller?
-Ben
My plan is to build strange and wonderful input devices. I’ve actually have a working prototype now – a mess of wires and buttons that acts like a USB keyboard.
I was actually going to do a post about it finally working, but I wanted to get a photo of my fancy breadboard and I don’t have a working camera. I think I have the power cable to the old camera at your place somewhere.