avr-chat
[Top][All Lists]
Advanced

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

RE: [Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]]


From: Michael Hennebry
Subject: RE: [Fwd: RE: [Fwd: RE: [avr-chat] BOOTLOADER on ATMega644]]
Date: Mon, 22 Dec 2008 11:20:42 -0600 (CST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

I think that the idea was to get a region of flash that
1. had the right size,
2. had the right alignment,
3. was relocated by the linker to not overlap other flash things
4. had a name to which C code could refer
5. was not initialized

I think that doing both 2 and 3 would require a linker script.
Dropping 3, makes it easy.
The linker command allows one to define an absolute symbol.
Refer to it as follows:
extern char absolute_symbol[];

I'm not sure about dropping 2.
PROGMEM would work if one also dropped 5.
I think that one can do something like this:
char fred[666] __attribute__((section("fred.text"));

fred, being global, would be initialized,
but I think that objcopy could remove section fred.text .
I expect that someone on this list knows for sure.

--
Michael   address@hidden
"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."




reply via email to

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