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

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

Re: [avr-gcc-list] Re: bootloader / flash coding / avr


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Re: bootloader / flash coding / avr
Date: Thu, 22 May 2003 16:27:25 +0200 (MET DST)

"E. Weddington" <address@hidden> wrote:

> 2. All the functions that are called in your bootloader() need to
> have BOOTLOADER_SECTION placed after their prototypes. This means
> you need to write prototypes for TxChar, RxChar, flushUSB.  Also,
> any variables that are needed for the bootloader, also need to
> placed under BOOTLOADER_SECTION, such as usb_boot_dev.

I don't think using a section attribute on variables makes much sense.
The section is supposed to be in ROM, so unless you're planning to
have some initialization data you are prepared to manually fetch with
(E)LPM, adding that attribute is certainly not going to yield the
expected results.

IMHO, it would be best if a bootloader used nothing else but
storage-class "auto" variables.  If static variables are really
needed, they might be placed on top of the RAM, and the bootloader
stack arranged to be below that (which requires some options on the
avr-gcc command-line that initiates the linker job).  If the main() of
the actual application starts, it's then free to reclaim that space by
starting their own stack at top of RAM again.

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/


reply via email to

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