Wiring Forum

All Forums => Wiring Hardware Questions => Topic started by: MCU6811 on July 14, 2011, 08:11:32 PM

Title: ATmega 128 bootloader + fuses
Post by: MCU6811 on July 14, 2011, 08:11:32 PM
I'm trying to upload a bootloader onto a new ATmega128 16MHZ chip attached to the wiring programmer using the AVR ISP mkII programmer through AVR studios 4.
Unfortunately, I was unable to make the LED flash with the following settings:

AVR bootloaders: http://www.procyonengineering.com/embedded/avr/bootloader/index.html (http://www.procyonengineering.com/embedded/avr/bootloader/index.html)

ATmega fuses: http://www.ethernut.de/en/isp/fuses.html (http://www.ethernut.de/en/isp/fuses.html)

with the best result as a partial flash with the STK500 Protocol v2 STK500/UART 0 1Kword 16.000MHz hex file. If someone could direct me to the correct bootloader with the fuse setting that would be great.
Title: Re: ATmega 128 bootloader + fuses
Post by: barragan on July 14, 2011, 09:06:50 PM
Why don't you try to upload the bootloader into your board using Wiring?
Title: Re: ATmega 128 bootloader + fuses
Post by: MCU6811 on July 15, 2011, 02:32:57 AM
If I used wiring, would I just need the cpp file?

http://wiring.uniandes.edu.co/source/trunk/wiring/firmware/hardware/Wiring/Wiring1Sparkfun/BoardDefs.cpp?revision=1160&view=markup (http://wiring.uniandes.edu.co/source/trunk/wiring/firmware/hardware/Wiring/Wiring1Sparkfun/BoardDefs.cpp?revision=1160&view=markup)

I tried the above link but it wouldn't even verify.
Title: Re: ATmega 128 bootloader + fuses
Post by: barragan on July 15, 2011, 11:15:44 AM
Here is the procedure: http://forum.wiring.co/index.php/topic,9.0.html (http://forum.wiring.co/index.php/topic,9.0.html)

just change the last step from:
Then select the Menu Tools->Board->Wiring->Wiring V1.0/WiringMini
Then select the Menu Tools->Burn Bootloader->w/ Wiring ISP

to:
Then select the Menu Tools->Board->Wiring->Wiring V1.0/WiringMini
Then select the Menu Tools->Burn Bootloader->w/ AVRISP mkii
Title: Re: ATmega 128 bootloader + fuses
Post by: MCU6811 on July 15, 2011, 06:27:09 PM
I tried the procedure you suggested but I keep getting the error:

avrdude was compiled without usb support.

I'm running everything on a windows XP machine.
Title: Re: ATmega 128 bootloader + fuses
Post by: barragan on July 15, 2011, 07:28:19 PM
You can look at the fuses used here: http://wiring.uniandes.edu.co/source/trunk/wiring/firmware/hardware/Wiring/boards.txt?revision=1160&view=markup (http://wiring.uniandes.edu.co/source/trunk/wiring/firmware/hardware/Wiring/boards.txt?revision=1160&view=markup)

I am just copying the section for your board below:
WiringV1.name=Wiring V1.0/Wiring Mini V1.0 @ 16 MHz
WiringV1.upload.protocol=wiring
WiringV1.upload.maximum_size=129024
WiringV1.upload.speed=115200
WiringV1.bootloader.low_fuses=0xFF
WiringV1.bootloader.high_fuses=0xDC
WiringV1.bootloader.extended_fuses=0xFF
WiringV1.bootloader.path=build/Wiring
WiringV1.bootloader.file=WiringBoot_Wiring-V1-Mega.hex
WiringV1.bootloader.unlock_bits=0x3F
WiringV1.bootloader.lock_bits=0x2F
WiringV1.build.mcu=atmega128
WiringV1.build.f_cpu=16000000L
WiringV1.build.core=AVR8Bit
WiringV1.build.hardware=Wiring1

just in case bootloaders are here: http://wiring.uniandes.edu.co/source/trunk/wiring/firmware/hardware/Wiring/bootloaders/build/Wiring/ (http://wiring.uniandes.edu.co/source/trunk/wiring/firmware/hardware/Wiring/bootloaders/build/Wiring/)

the one for your board is: WiringBoot_Wiring-V1-Mega.hex