Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Bootloader troubles

2005-07-10 by Gustavo Goretkin

Hello, I have an STK500 board, and i need to do some UART stuff on my 
computer with it, I only have 1 serial port on my "recent" mobo, and it 
is a pain  to have to switch between the ports, and I've tried an "AB" 
switch, but still I would rather try something new. I bought a $10 USB 
to RS232 converter on eBay and it doesn't work. *sigh*, its a cypress 
chip, and well apparently it doesn't work.
So I am looking into using a boot loader program, BTW this is on a 
MEGA16 chip. So the first boot loader I looked into is the one available 
at this website: http://hubbard.engr.scu.edu/embedded/avr/bootloader/ . 
When I found this, I thought it was great, it emulates the STK500 so I 
won't even have to leave the AVR studio IDE. So I program my chip with 
it, I'm using the right clock, connect the UART to the spare one on the 
STK500 board, and I open the programmer in AVR studio, and it detects 
the "board" it says it has an old firmware installed, but I don't 
install it because I doubt the boot loader will do anything with it. I 
load a hex file of a program I made, and it generates an error when 
trying to go into "Programming" mode. I give up on it after a couple of 
hours of looking on line for any solution and continue on my search for 
a boot loader.
I come up against one written in IAR C, using information from this site 
: http://projects.gbdt.com.au/boot162/ and it is the boot loader that 
Atmel themselves wrote, its one of there aplication notes, and it 
emulates the "AVR PROG" protocol. I download the trial of IAR C, and I 
can't even get the thing to compile (I am not very good at C, at all), i 
twiddle with some of the compiler settings (CPU target, clock speed so 
forth) and I only generate more errors. Still not giving up, I search 
again for a boot loader.
This time its Megaload, which I found on a search in www.avrfreaks.net . 
http://www.microsyl.com/megaload/megaload.html . I download the trial of 
ImageCraft C compiler, and I am able to compile the code this time, I 
have all the defines correct, and compiler settings correct (I hope). I 
program the HEX file to the MEGA16 and then connect the UART again. I 
run MEGALOAD, load the HEX file to program through the boot loader, and 
press the reset button on the board. Megaload detects (sometimes it 
detects other crazy crap) an Atmega16, with 16k of flash, 512 k of 
eeprome and so forth, and it tries to load the hex file. and on the 
window the left I get a never ending scrolling list of

Programming Page File #0
Programming Failed
Programming Page File #0
Programming Failed
Programming Page File #0
Programming Failed
....

And light that anyone could shine for me would be greatly, imensly 
appreciated. Thank you in advance
 Gustavo

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.