You've now found yourself exactly where I did.  I wanted to bury a
software part number at
0x100 in the flash so a 'universal' programming 'pod' could look in
this specific location of 
the hex file and determine if the target was valid for an upgrade
regardless of what AVR
was implemented on the target board.  Best I could do is define my own
section at 0x100
leaving the bytes below unused.  It appears that the gcc linker is not
able to wrap
code around this reserved section like the IAR linker can and utilize
the space above
and below 'my section'.

>>> <[EMAIL PROTECTED]> 12/20/2007 9:09 AM >>>
Thanks for the links, but that is not exactly what I am looking for.
Using this document I was able to create output like this:

0x0000-0x008F .vectors
0x0090-0x03FF gap
0x0400-0x041F my section
0x0420-       rest of the .text section

The gap is empty - it's waste of the flash space. I have not found if
it is possible to put my section to any address and let linker to "flow
the .text section round it", it seems to me that it is not possible, but
I don't know why - the linker should be able to do this, it's not a
difficult task...
______________________________________________________________
> Od: [EMAIL PROTECTED] 
> Komu: Martin Ĺ̋iĹžka <[EMAIL PROTECTED]>
> CC: avr-gcc List <avr-gcc-list@nongnu.org>
> Datum: 20.12.2007 01:12
> Předmět: Re: [avr-gcc-list] Howto put constants on fixed address
>
>On Dec 19, 2007, at 5:03 PM, Martin Žižka wrote:
>
>> Yes, that will place the .length segment between .vectors > and
.progmem. But
>> you are unable to place it to some exact address. That will place it
>
to
>> address that is offset_of(.vectors)+length_of(.vectors). That can
be
>> different for some cpus.
>
>
>I think this URL describes the syntax to do what Martin is looking to

do:
>http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_node/ld_21.html#SEC21

>
>More hints here, in that one can edit the . address:
>http://www.gnu.org/software/binutils/manual/ld-2.9.1/html_node/ld_10.html

>
>--
>David Kelly N4HHE, [EMAIL PROTECTED] 
>========================================================================
>Whom computers would destroy, they must first drive mad.
>
>



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org 
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to