Im loosing my head here.

Hey guys,
I really need to get this bootloader on the atmega328P. Im struggling. I tried,

I also tried uploading the bootloader with 2 uno, I remember connecting pin12 to pin 12 a method llike that i found online somewhere.

avrdude: stk500_getsync(): not in sync: resp=0x00, I get this error for first method cant remember the second one. But I got error aswel.

This is what I have: 2 arduino Uno. I also have an old ATMEL AVR board. says its the stk500. Both the chips were previously loaded with this bootloader long time ago. Have no idea how they were bootloader. Just got told that they are bootloaded. pin 13 is flashing but when i use the arduino IDE 1.0 to load any sketch onto it, i get Binary sketch size: 1026 bytes (of a 32256 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00

Can someone please tell me step by how to do this. Im losing my head here.I looked at so many things online.
I also got AVR studio 5.1 installed.

Maybe if someone can give me a step by step run through how to use AVR studio 5.1 with the stk500 ATMEL AVR board to program the bootloader onto the ATMEGA328P-PU this would help.
Ill give it another shot. I really dont want to buy pre programmed chips.
And also maybe what I can try to get the bootloader on using two arduino UNOs.

Id really appreciate it. Thanx guys. Sorry for all the inconvience :slight_smile:

Okay, I installed AVR Studion 4 now. And Im getting the my AVR ATMEL to flash my uni using the ISP -> ISCP port on uno.

Here the complications though. When I use the ATMEGABOOT_168_atmega328_pro8Mhz.hex. LED 13 starts flashing. then I try upload a sketch and it works. But heres the problem. When I try upload the sketch the second time i get avr dude error. same as i got before. I flash the chip again I cn program 1 sketch into it then it does not allow me to do it again, I have to reflash the chip. ?
when i use the atmegaboot_168_atmega328.hex. It doesnt even allow me to upload any sketches AVR dude error?

(deleted)

THis is what I set my fuses to Found this on ->
http://arduino.cc/playground/Learning/Burn168

0xF8
0xDF
0xFF

AND STOPBIT TO 0Xcf

any recommendation of what it must be?

0xFF for stopbit i mean

no memory lock feature enabed.
no lock on spm and lpm in application sector
lpm and spm prohibited in bootloader

(deleted)

Remember finding that on a forum somewhere. Tried those settings. But my AVR studio 4 is not liking the 0x05 at extended.

(deleted)

extended_fuses=0x05

You have to specify the "unused" fuse bits as 1s rather than 0, which means that EFUSE should of 0xFD (0b11111101)

Binary sketch size: 1026 bytes (of a 30720 byte maximum)

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x41

avrdude: arduino_read_sig_bytes(): (a) protocol error, expect=0x14, resp=0x75
avrdude: error reading signature data for part "ATMEGA328P", rc=-2
avrdude: error reading signature data, rc=-1

Thats the error I get when I set my board to Arduino Duelminanove when I set my extended fuse to 0xFD. When I set my board to Uno I just get avrdude sync error. I only reason Im bringing this up is because I remember buying a chip long time ago that was bootlaoded and it gave me sync error when I used the uno board setting and didnt when I used the duel board settings. Is this because how it was bootloaded at the factory? Im going to try what what sky catcher mentioned right. Ill get back to you in a short while. Thanx allot guys

give me a step by step run through how to use AVR studio 5.1 with the stk500 ATMEL AVR board to program the bootloader onto the ATMEGA328P-PU this would help.

That would be doing things the hard way, since the Arduino environment (including the build and bootloader and bootloader build environment) isn't set up to use AVR Studio.

Easiest solution, use optiLoader on one of your Unos. It's been suggested to you already in other threads; have you tried it?

I tried that method using two arduino Unos. I get an error. I can give that another bash.

www.google.co.za/search?q=optiloader+arduino&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-ZA:official&client=firefox-a

I tried it via that link right now. still get avrdude_getsync error. Think the problem might be that I pre flashed them with the wrong setting using AVR studio 4.

C:\MyStuff\Work\Thesis\arduino-1.0-windows(2)\arduino-1.0\hardware\tools\avr\bin

avrdude.exe in that directory.

Now I go to command prompt. To that directory. try avrdude -h... all the commands pop up.
But then when I copy paste your line it says it cant find config file.

I saw theres a config fille in this directory
C:\MyStuff\Work\Thesis\arduino-1.0-windows(2)\arduino-1.0\hardware\tools\avr\etc\avrdude.conf

How do i link the exe to it? /should I just go change settings manually.

C:\MyStuff\Work\Thesis\arduino-1.0-windows(2)\arduino-1.0\hardware\tools\avr\bin

#------------------------------------------------------------

ATmega328P

#------------------------------------------------------------

part
id = "m328p";
desc = "ATMEGA328P";
has_debugwire = yes;
flash_instr = 0xB6, 0x01, 0x11;
eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
0x99, 0xF9, 0xBB, 0xAF;
stk500_devcode = 0x86;

avr910_devcode = 0x;

signature = 0x1e 0x95 0x0F;
pagel = 0xd7;
bs2 = 0xc2;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";

chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";

You'll need a command like (this is from a mac, so it won't be exactly the same):

/Applications/arduino/arduino-1/Arduino-1.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/arduino/arduino-1/Arduino-1.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -patmeag328p -carduino -P /dev/tty.usbmodemfd3141 -b19200 -v -U lock:w:0x3F:m -U flash:w:optiboot_atmega328p.hex -U lock:w:0x2F:m