Programming Bootloader

Moderator: adafruit

Please be positive and constructive with your questions and comments.
Locked
Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Programming Bootloader

Post by Synclavier »

I programmed the Uzebox SD Loader and it doesn't work, and as a result I cannot get the original bootloader back. Programming Boulderdash works...

I used the latest AVR Studio with USBTinyISP, and jumpered R4 and R7.

Does anyone have the correct settings to flash back the original and the Uzebox SD Loader :?:

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Programming Bootloader

Post by adafruit »

the bootloader should be in the download package from ladyada.net

Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Re: Programming Bootloader

Post by Synclavier »

I have the two bootloaders in hex, but using avrdude I cannot flash them. It gives an error when I program them. I was wondering what special option I need to add to flash the bootloaders (SD and Normal)?

In the meantime I can compiled maze and using avrdude uploading was easy and working. Using avrstudio when I program the bootloaders I get the error 0x013A = 0xFF should be 0x00.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Programming Bootloader

Post by adafruit »

if you dont need the bootloader, id skip it. it wont be included in future fuzeboxen

Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Re: Programming Bootloader

Post by Synclavier »

The Fuzebox is when build a closed box, to program it I have to open it and put a cable inside. If we can use the boot sd loader, we only have to put the files on the sd card.

How do you program the original fuzebox bootloader?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Programming Bootloader

Post by adafruit »

we use a usbtinyisp

uze6666
 
Posts: 31
Joined: Sat Dec 27, 2008 4:00 pm

Re: Programming Bootloader

Post by uze6666 »

I programmed the Uzebox SD Loader and it doesn't work, and as a result I cannot get the original bootloader back.
When you say it does not work, what's the symptoms? Have you set the bootloader size fuse (BOOTSZ)? The SD bootloader is bigger than the Fuzebox one, so this must be set correctly.

-Uze

Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Re: Programming Bootloader

Post by Synclavier »

See below the settings:
Flash1.jpg
Flash1.jpg (294.04 KiB) Viewed 10356 times

Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Re: Programming Bootloader

Post by Synclavier »

See below the flash
Flash2.jpg
Flash2.jpg (360.5 KiB) Viewed 10355 times

Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Re: Programming Bootloader

Post by Synclavier »

When I start the Fuzebox there is a fuzzy line after a few seconds when flashed with avrstudio as a above two pcitures.

Flashing the demo file OK:

avrdude -c usbtiny -p atmega644 -U flash:w:Uzeamp.hex


Flashing the fuzebox bootfile:

avrdude -p m644 -c usbtiny -e -U hfuse:w:0x12:m -U lfuse:w:0xef:m -U flash:w:ATmegaBOOT_644.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9609
avrdude: erasing chip
avrdude: reading input file "0x12"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0x12:
avrdude: load data hfuse data from input file 0x12:
avrdude: input file 0x12 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xef"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xef:
avrdude: load data lfuse data from input file 0xef:
avrdude: input file 0xef contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "ATmegaBOOT_644.hex"
avrdude: writing flash (65512 bytes):

Writing | | 0% 0.00s
avrdude: error: usbtiny_send: usb_control_msg: sending control message failed, w
in error: The I/O operation has been aborted because of either a thread exit or
an application request.
(expected 128, got -116)
Writing | ################################################## | 100% 0.55s

avrdude: failed to write flash memory, rc=-1

avrdude: safemode: Fuses OK

avrdude done. Thank you.

uze6666
 
Posts: 31
Joined: Sat Dec 27, 2008 4:00 pm

Re: Programming Bootloader

Post by uze6666 »

I don't know about the Fuze bootloader and I don't use USBTiny, but the settings in the pictures looks good to me, it should work. Which HEX version did you use?

-Uze

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Programming Bootloader

Post by adafruit »

try using -B 1 in avrdude

Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Re: Programming Bootloader

Post by Synclavier »

In the example in AvrStudio I used the first sdbootloader from the uzebox forum. In Avrdude I used the Fuzebox bootloader, the parameters I used from another standard bootloader with same bootloader size. I checked all available versions of the bootloaders in both programs with different parameters.

One of the issues is that with Avrdude programming the flash is always without problems, using Avrstudio sometimes gives errors (small glitches in the programs, or error during verify).

Synclavier
 
Posts: 8
Joined: Mon Oct 19, 2009 10:26 am

Re: Programming Bootloader

Post by Synclavier »

Today received the STK500 avr programmer, and flashed the Fuzebox without any problems. The USBtinyISP did not program the fuses correct.

I compiled the last SDBootloader and works without any problems.... :)

Locked
Please be positive and constructive with your questions and comments.

Return to “Fuzebox (discontinued)”