avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Move interrupt vector to bootloader


From: Yannick PODGORSKI
Subject: Re: [avr-gcc-list] Move interrupt vector to bootloader
Date: Mon, 7 Feb 2005 10:14:15 +0100

If it's not to late.
To move interrupt vector to bootloader in 'C' (page 48 of manual) :

/* Enable change of Interrupt Vectors */
GICR = (1<<IVCE);

/* Move interrupts to boot Flash section */

GICR = (1<<IVSEL);

If not the ATMEGA8 resets.



Yannick Podgorski

www.kuantic.com

----- Original Message ----- From: "Marek Michalkiewicz" <address@hidden>
To: "andi" <address@hidden>
Cc: <address@hidden>
Sent: Saturday, February 05, 2005 12:10 PM
Subject: Re: [avr-gcc-list] Move interrupt vector to bootloader


On Sat, Feb 05, 2005 at 09:20:48AM +0700, andi wrote:
Does anyone know how to move interrupt vector to bootloader in 'C' ?

Pass -Ttext 0x1800 to avr-ld when linking the bootloader, like this:

avr-gcc -Wl,-Ttext,0x1800

and the program will be located at the specified byte address
(0x1800 is an example for the largest ATmega8 bootloader - 1K words).

On the larger chips, the following avr-gcc options may be useful when
building bootloaders:

-mshort-calls:
  use "rcall" (smaller than "call"), recommended for <=4K bootloaders
  on >8K devices ("rcall" is enough to reach anywhere in the bootloader)

-mno-tablejump:
  *required* for bootloaders on >64K devices if -mshort-calls is not used,
  to avoid tablejump insns using "lpm" (which won't work above 64K)

Hope this helps,
Marek


_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

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