[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Choose where the code is placed in flash memory
From: |
E. Weddington |
Subject: |
Re: [avr-gcc-list] Choose where the code is placed in flash memory |
Date: |
Thu, 05 Dec 2002 09:21:28 -0700 |
On 4 Dec 2002 at 22:14, address@hidden wrote:
>
> My question is: For what reason is it justified to lock something to a
> specific address instead of allowing the compiler/linker do it's job?
>
> What makes this any different then using "Magic number" and global
> variables that are difficult to maintain and support?
>
> Jeff
The biggest reason is if you are writing a bootloader. The bootloader
code needs to reside in the NRWW section (see Atmel specs). This
section resides at a particular high address. This address is also
settable by fuses. So one would write bootloader code, put it in a
user-named section and relocate this section to a fixed, specific
address.
Eric
avr-gcc-list at http://avr1.org