[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] bootloader and irq vectors

From: Larry Barello
Subject: RE: [avr-gcc-list] bootloader and irq vectors
Date: Thu, 19 May 2005 15:12:46 -0700

This is simple: you set the reset vector to the beginning of the boot sector
(see the fuse settings in STK500, or the data sheet).  The boot sector has
vectors, or not, your choice.  When the boot code determines that in fact
you want to run your application, it jumps to location 0 where the real (and
updated) vector table resides.

I am trying to shoehorn my boot loader into 1kb or less since my mega16
application is > 14kb right now.  To do that I need to dump the C startup
(and vectors) and somehow trick the compiler into using "rcall" instead of
"call" (or just write the whole thing in assembly :( )  Otherwise the many
boot loaders on the web will all work great.  They just take a bit too much
room for me.

Do a search for ATmegaBOOT.c for an example based upon Jason Kyle's original
stk500boot.c (no longer available AFAIK)

-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf
Of Marlin Unruh
Sent: Thursday, May 19, 2005 1:22 PM
To: avr-gcc-list
Subject: [avr-gcc-list] bootloader and irq vectors

I am writing a bootloader on for an ATmega16, and an ATmega163. I am
planning to up-grade the application flash via a CAN bus chip on the
SPI port.

I do NOT want the vector table in the bootloader section because the
vectors will change with firmware up-grades. I also do NOT want to
jump to the bootloader from the application section in case the
application section gets trashed doing an up-grade.

Is this impossible? Any ideas.

I have been following the thread on How to skip c-runtime init--

AVR-GCC-list mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]