[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Move interrupt vector to bootloader
From: |
Marek Michalkiewicz |
Subject: |
Re: [avr-gcc-list] Move interrupt vector to bootloader |
Date: |
Sat, 5 Feb 2005 12:10:42 +0100 |
User-agent: |
Mutt/1.5.6+20040907i |
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