Forums

Simple bootloader for AVR?

Started by Unknown January 6, 2005
I'm building an AVR-based machine controller for a customer, and he has
asked if I can make the unit upgradable from a PDA. The end-user wants
to read/write EEPROM setup data from a handheld device (they're
currently choosing between Palm or WinCE) and for this purpose I added
a serial port and simple comms protocol in the original design. Now he
wants to be able to upgrade the firmware over that interface too, so
the field reps don't have to lug out a laptop and ISP cable.

The catch is that he wants to implement the minimum possible custom
software on the PDA side, and the bootloaders I've found seem to
require variously complex back-end support on the PC; they either
emulate an STK500, or they use proprietary Windows back-ends. I guess
that recompiling uisp for WinCE is not out of the question, but it
seems like a slippery slope towards software horror.

Is there an AVR bootloader out there (for mega32 running off internal
RC at 8MHz) that can accept a simple HEX file sent dumbly over RS232 at
a known, fixed baud rate, with no feedback or flow control?
Reasonably-priced buyware is not out of the question, but commissioning
a custom bootloader is not an option - if it was, then I'd be writing
it myself. This is a low volume application; the total production
volume is unlikely to exceed 1000 units over two years.

As cheap as CPUs are, you might consider a second CPU whose job is to 
reprogram the first one.



> > Is there an AVR bootloader out there (for mega32 running off internal > RC at 8MHz) that can accept a simple HEX file sent dumbly over RS232 at > a known, fixed baud rate, with no feedback or flow control? > Reasonably-priced buyware is not out of the question, but commissioning > a custom bootloader is not an option - if it was, then I'd be writing > it myself. This is a low volume application; the total production > volume is unlikely to exceed 1000 units over two years.
There is an open source application to field upgrade the AVR. AVR911 Open Source Programmer. but sending a hexfile may be possible wihtout any development on the CE end at all. -- Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This is a personal view which may or may not be share by my Employer Atmel Nordic AB
Hi Ulf,

>AVR911 Open Source Programmer.
I took a look at this, but I'm not sure it's really the answer to my problem. Ideally I want the customer to be able to use a simple dumb terminal program to send the firmware upgrade as a text HEX dump. I think this OUGHT to be possible (without actually sitting down and working out the required RAM buffering, flash write time and latencies involved). But what I'm looking for is a pointer to a pre-written bootloader that implements something along these lines. I didn't see that in AVR911; did I miss something?
Didnt' try it , but for that money it's at least worth trying:
http://www.prllc.com/productcart/pc/viewCat_P.asp?idCategory=10

Regards

> http://www.prllc.com/productcart/pc/viewCat_P.asp?idCategory=10
I read about AVRBL while I was googling, but the way I understood it, there is still a proprietary protocol involved (hence the proprietary Windows app shipped with the product). I'll take a closer look.
On 6 Jan 2005 06:38:58 -0800, larwe@larwe.com wrote:

>Ideally I want the customer to be able to use a simple dumb >terminal program to send the firmware upgrade as a text HEX dump.
I've made a bootloader once, but perhaps it is too simple. It does not take a HEX file, but rather a straight binary image. And it is sent with the X-modem protocol, so almost every standard terminal program can send it. I think I published it a long time ago over at avrfreaks.net. If it sounds interesting, I can try to dig it up from somewhere. Best regards, Mikael -- Mikael Ejberg Pedersen
Hi Mikael,

>I've made a bootloader once, but perhaps it is too simple. It does not >take a HEX file, but rather a straight binary image. And it is sent
I'll search avrfreaks when I get home tonight. Sounds like it's a pretty close match to my needs, thanks!
On 6 Jan 2005 12:38:12 -0800, larwe@larwe.com wrote:

>I'll search avrfreaks when I get home tonight. Sounds like it's a >pretty close match to my needs, thanks!
Well, I tried to find it, but the search engine won't go back further than early 2004. I guess it has something to do with the big change of forum software they did back then. Instead, just grab it here: http://www.ejberg.dk/temp/boot16.zip It is written for the Mega16 at 16 MHz (and 9600 baud). For some other crystal frequency or baudrate, you need to adjust some constants. Also for other size processors, you probably need to rewrite the flash write part of the code. Best regards, Mikael -- Mikael Ejberg Pedersen
<larwe@larwe.com> wrote in message
news:1104984223.049715.178410@c13g2000cwb.googlegroups.com...
> I'm building an AVR-based machine controller for a customer, and he has > asked if I can make the unit upgradable from a PDA. The end-user wants > to read/write EEPROM setup data from a handheld device (they're > currently choosing between Palm or WinCE) and for this purpose I added > a serial port and simple comms protocol in the original design. Now he > wants to be able to upgrade the firmware over that interface too, so > the field reps don't have to lug out a laptop and ISP cable. > > The catch is that he wants to implement the minimum possible custom > software on the PDA side, and the bootloaders I've found seem to > require variously complex back-end support on the PC; they either > emulate an STK500, or they use proprietary Windows back-ends. I guess > that recompiling uisp for WinCE is not out of the question, but it > seems like a slippery slope towards software horror. > > Is there an AVR bootloader out there (for mega32 running off internal > RC at 8MHz) that can accept a simple HEX file sent dumbly over RS232 at > a known, fixed baud rate, with no feedback or flow control? > Reasonably-priced buyware is not out of the question, but commissioning > a custom bootloader is not an option - if it was, then I'd be writing > it myself. This is a low volume application; the total production > volume is unlikely to exceed 1000 units over two years. >
This is the device you are looking for, we use these to upgrade AVR firmware in the field by non-electronic people. http://www.4d-electronics.co.nz/Business/productsbusiness/productsbusiness.htm John