Hi everyone,
I think my Arduino's bootloader is bricked, i've tryed to upload some sketches from different computers and i'm receiving this message everytime:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Since i don't have a programmer, i've searched the internet and seems like it's possibile to use the Raspberry Pi 2 model B as an avr programmer. I've done a few modifications to that blog post:
Pin D51 (MOSI) on Arduino to pin 20 on RPi
Pin D50 (MISO) on Arduino to pin 16 on RPi
Pin D52 (SCK) on Arduino to pin 21 on RPi
and i didn't use the command sudo /opt/avrdude/bin/avrdude -p atmega328p -c linuxgpio -v -t, instead i've used this one: sudo /opt/avrdude/bin/avrdude -p m2560 -c stk500v2 linuxgpio -v -t
but i'm receiving this error:
Using port : /dev/ttyS0
Using Programmer : stk500v2
avrdude: ser_open(): can't open device "/dev/ttyS0": No such file or directory
avrdude done. Thank you.
I'm pretty sure the command i've used is not the right one. Can you help me please?
ohhh i've found i little error in my command, now i've tryed this: sudo /opt/avrdude/bin/avrdude -p m2560 -c linuxgpio -v -t but i'm receiving this error:
avrdude: Version 6.1, compiled on Jun 11 2015 at 11:31:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/opt/avrdude/etc/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : unknown
Using Programmer : linuxgpio
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : linuxgpio
Description : Use the Linux sysfs interface to bitbang GPIO lines
Pin assignment : /sys/class/gpio/gpio{n}
RESET = 12
SCK = 21
MOSI = 20
MISO = 16
avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
That error normally indicates that your connections are incorrect. Recheck to ensure that your connections are reliable and correct.
I've checked again the connections, but it seems all good to me. I'll attach a couple of pics, maybe I'm missing something...
still no luck, i always get that error message. 