The thing is that for 328 everything works great, while for 48 I got a lot of errors from avrdude. For example:
Code: Select all
ino build -m gertduino48
/usr/bin/avrdude -c gpio -p m48p ./.build/gertduino48/firmware.hex -U flash:w:./.build/gertduino48/firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e920a
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: To protect your AVR the programming will be aborted
avrdude done. Thank you.
Code: Select all
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x003d0a
avrdude: Expected signature for ATMEGA48P is 1E 92 0A
Double check chip, or use -F to override this check.
avrdude done. Thank you.
But still once for a time it is possible to succeed:
Code: Select all
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e920a
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: current erase-rewrite cycle count is -512 (if being tracked)
avrdude: erasing chip
avrdude: reading input file "./.build/gertduino48/firmware.hex"
avrdude: input file ./.build/gertduino48/firmware.hex auto detected as Intel Hex
avrdude: writing flash (952 bytes):
Writing | ################################################## | 100% 0.13s
avrdude: 952 bytes of flash written
avrdude: verifying flash memory against ./.build/gertduino48/firmware.hex:
avrdude: load data flash data from input file ./.build/gertduino48/firmware.hex:
avrdude: input file ./.build/gertduino48/firmware.hex auto detected as Intel Hex
avrdude: input file ./.build/gertduino48/firmware.hex contains 952 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.07s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x41 != 0x00
avrdude: verification error; content mismatch
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode
avrdude done. Thank you.
EDIT
In other thread (http://www.raspberrypi.org/forum/viewto ... 96&t=62026) I have found Gordon's suggestion that such behaviour can occur when RPi is overclocked. It turns out out that some time ago I overclocked my Pi and forgot about that. After returning to factory settings everything runs as it should.