Arduino bootloader problem

Rasprava o AVR mikrokontrolerima, AVR projekti i drugo vezano za AVR...

Moderators: pedja089, stojke369, trax, InTheStillOfTheNight

Post Reply
User avatar
Kicker
Posts: 16
Joined: 27-06-2010, 18:49
Location: Zagreb, Cro

Arduino bootloader problem

Post by Kicker »

Radim svoju verziju "Arduino-a" koja se može ubosti u breadbord prema shemi sa ove stranice:http://content.solarbotics.com/products ... manual.pdf. Jedina razlika je ta što su komponente uključujući i mikrokontroler polemljene na pločicu (mikrokontroler se nalazi na socket-u kako bi ga mogao mjenjati). Problem nastaje kada pokušam uploadati bootloader u mikrokontroler. Napravio sam parallelni port programator sa sljedeće stranice http://arduino.cc/en/Hacking/ParallelPr ... Programmer i kada odem na Burn bootloader (Arduino software) nakon par sekundi dobijem sljedeći error:

Ako za Board stavim UNO:

avrdude: verification error, first mismatch at byte 0x7e00
0x11 != 0xff
avrdude: verification error; content mismatch

Ako pak stavim Duemilanove w/ATmega328:

avrdude: verification error, first mismatch at byte 0x7800
0x0c != 0xff
avrdude: verification error; content mismatch

Probao sam i sa zamjenom mikrokontrolera ali se dešava ista stvar.
Jel ima netko ko bi mi mogao na te dvije ATmega 328p-pu probati staviti bootloader i blink sketch nekom drugom metodom čisto da vidim da u njima nije problem. Dalje bi mogao sam ubuduće (ako zatreba)uploadati bootloader koristeći te dvije ATmega-e i opciju Arduino as ISP.

Iz Zagreba sam.
It doesn't matter if you win by an inch or a mile; winning's winning.

It's not just tuning . . . It's a lifestyle!
User avatar
zigzag9
Napredujem
Napredujem
Posts: 193
Joined: 06-06-2011, 23:35
Location: HR

Re: Arduino bootloader problem

Post by zigzag9 »

Probaj složiti AVR DASA programator sa slike: http://www.compendiumarcana.com/forumpics/avr_dasa.png

Zatim skini WinAVR, i instaliraj, pa probaj pomoću AVRDUDE ubaciti bootloader na ATmegu.

Za ATmega328 (Arduino Uno), bootloader ti se nalazi u Arduino folderu: /hardware/arduino/bootloaders/arduino/, a zove se optiboot_atmega328.hex

Komanda bi trebala biti nešto ovakvo (ovisno o COM portu):

Code: Select all

avrdude -c dasa -P com1 -p atmega328 -U flash:w:optiboot_atmega328.hex
Što se tiče FUSE i ostalih postavki, za Arduino Uno su ovakve:

Code: Select all

uno.name=Arduino Uno
uno.upload.protocol=arduino
uno.upload.maximum_size=32256
uno.upload.speed=115200
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.path=optiboot
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.core=arduino
uno.build.variant=standard
Evo još jedan link na upute za AVRDUDE: http://www.ladyada.net/learn/avr/avrdude.html
User avatar
Kicker
Posts: 16
Joined: 27-06-2010, 18:49
Location: Zagreb, Cro

Re: Arduino bootloader problem

Post by Kicker »

Svaka ti dala (i po nekoliko puta). Programator radi perfektno i dignuo sam bootloadere na obe chipa.

Međutim ostao mi je jedan sitni problemčić. Naime chip-ovi rade sa Duemilanove bootloaderom i uredno se programiraju, međutim kada dignem na njih Uno bootloader onda dobijem sljedeću grešku prilikom uploada programa:avrdude: stk500_getsync(): not in sync: resp=0x00 Probao sam sve i svašta (postavke serijskog porta, pritiskanje reset tipke u različita vremena...) ali jednostavno mi sa Uno bootloader-om ne radi. Tako da ću pretpostavljam ostati na Duemilanove bootloaderu. Hvala na pomoći.

PS: Parallel porogrammer sa njihove stranice nije za ništa i skužio sam da je programiranje na njemu stvarno pitanje sreće.
It doesn't matter if you win by an inch or a mile; winning's winning.

It's not just tuning . . . It's a lifestyle!
User avatar
zigzag9
Napredujem
Napredujem
Posts: 193
Joined: 06-06-2011, 23:35
Location: HR

Re: Arduino bootloader problem

Post by zigzag9 »

http://www.ladyada.net/learn/arduino/help.html
If you get the following error message "avrdude: stk500_getsync(): not in sync: resp=0x00" that means that the Arduino is not responding. There are literally dozens of reasons this could be.
Check the following:
  • If you have a NG Arduino, did you press reset just before selecting Upload menu item?
    Is the correct Serial Port selected?
    Is the correct driver installed?
    Is the chip inserted into the Arduino properly? (If you built your own arduino or have burned the bootloader on yourself)
    Does the chip have the correct bootloader on it? (If you built your own arduino or have burned the bootloader on yourself)
User avatar
Kicker
Posts: 16
Joined: 27-06-2010, 18:49
Location: Zagreb, Cro

Re: Arduino bootloader problem

Post by Kicker »

Probao sve navedeno ali Duemilanove bootloader radi savršeno na već 4 klona tako da ostajem na njemu. BTW http://www.ladyada.net i http://www.sparkfun.com/tutorials su stranice koje sam prvo pogledao za rješenje jedino što je problem bio što mi se nije dalo kupovati programator, a parallel port programmer nikako da proradi. Ovaj serijski pak radi perfektno bez obzira što je sklepan tek toliko da radi. Sada ga moram složiti pak kako spada (kablovi, konektori, kućište..). Stvarno puno hvala na brzom rješenju. Ispada da se Arduino klon može napraviti za cca 15 kuna (bez USB to Serial) samo treba znati kako.
It doesn't matter if you win by an inch or a mile; winning's winning.

It's not just tuning . . . It's a lifestyle!
Post Reply