|Subject:||Re: [avr-gcc-list] Howto put constants on fixed address|
|Date:||Thu, 20 Dec 2007 09:31:53 -0600|
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'.
>>> <address@hidden> 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:
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: address@hidden
> Komu: Martin Ĺ̋iĹžka <address@hidden>
> CC: avr-gcc List <address@hidden>
> 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
>> you are unable to place it to some exact address. That will place it >
>> 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
>More hints here, in that one can edit the . address:
>David Kelly N4HHE, address@hidden
>Whom computers would destroy, they must first drive mad.
AVR-GCC-list mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|