Yahoo Groups archive

AVR-Chat

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

Message

RE: [AVR-Chat] Bootloader troubles

2005-07-10 by stevech

I've bought and tossed a couple of USB to serial thingies. Last one I bought
was a China special but the packaging said it used the FTDI chipset/driver.
Works perfectly with XP.

There's a ASM language bootloader which is only 512Bytes - source in public
domain. Works on mega8 and bigger. Here's the header from the main file
;***********************************************
;* This is a modified version of design note #032 'DN032' From
http://www.avrfreaks.com
;* It is meant specifically for atmega-8 and avrprog.exe 1.37 or better.
;* The original DN did not seem to work properly with a atmega8, after some
debugging it 
;* appeard that the problem was that the code did not re-enable RWW access
after page write or erase. Fixed.
;* Notes:
;* Added an esc char test at the beginning of the code. Modify as necessary.
;* I left in the eeprom program counter.
;* Be sure to use avrprog.exe 1.37 or a version that supports atmega8 (the
regular download from atmel is 1.33)
;* While debugging I also discovered that avrprog support a baud rate of
115200, seems to work okay.
;* Fuses: BLB11 BOOTSZ1 BOOTRST
;* comments or questions?  carlott@si.rr.com   http://users.rcn.com/carlott/

;********** B O O T L O A D E R **********
;* File : bootloader_m8.asm (Include chip erase counter)
;* Compiler : AVR Studio
;* Target : mega8


-----Original Message-----
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Gustavo Goretkin
Sent: Saturday, July 09, 2005 5:34 PM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Bootloader troubles

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




 
Yahoo! Groups Links

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.