avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Re: Unified ELF file


From: Michael Hennebry
Subject: Re: [avr-libc-dev] Re: Unified ELF file
Date: Mon, 3 Sep 2007 10:10:56 -0500 (CDT)

On Mon, 3 Sep 2007, Colin O'Flynn wrote:

> At any rate - the reason I never got around to doing offsets is I wasn't sure
> of the answer to this question:
>
> Say you have an offset that looks like:
>
> 0x820000  LFUSE
> 0x820001 HFUSE
> 0x820002 EFUSE
>
> (note: I just hit '0' a bunch of times after 82, that might not be the right
> number)
>
> What happens in the hex file if you just specify an LFUSE and EFUSE. Does the
> hex file generate two lines, each with just one byte in it? Or does it

I would hope so.

> generate a continous line where LFUSE and EFUSE are what you specified, and
> HFUSE is the default?
>
> The reason being we need a way to figure out if a fuse value was specified. If
> the user forgets to specify a certain fuse, I don't think it should set it to
> any default. Even if the default was set up to make sense (aka state chip is
> shipped in).
>
> Instead if no value is specified, it shouldn't mess with the fuses.

Right.

Specifying a default would be a really bad idea.
Perhaps with the --bossy flag set,
the elf reader would be allowed to issue an error
message instead of a hex file if a fuse was omitted.

I've read that some people don't like having any special sections,
so having several probably wouldn't go over very well.

How about this:
Unless otherwise disqualified, the section with the highest
address gets everything that doesn't go into flash or ram.
The fuses are at local symbols lfuse, hfuse and efuse.
The eeprom starts at local symbol eeprom.
I'm assuming that static C variables get local symbols.
The .text and possibly .data sections would
be among those otherwise disqualified.

Something similar could be done with hex files.
The contiguous sequence of bytes with the highest
address would contain the table of contents.
It would contain two bytes plus four addresses:
two bytes would be a version number and there would be
addresses for eeprom, lfuse, hfuse and efuse.
A zero address would indicate absence.

There would be no need for magic addresses or magic global symbols.

-- 
Mike   address@hidden
"Horse guts never lie."  -- Cherek Bear-Shoulders





reply via email to

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