avr-gcc-list
[Top][All Lists]
Advanced

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

RE: [avr-gcc-list] Howto put constants on fixed address


From: Martin Žižka
Subject: RE: [avr-gcc-list] Howto put constants on fixed address
Date: Wed, 19 Dec 2007 23:57:37 +0100

Can you send me that linker script?
I've tried to alter that script to make it work that way I want with no
success. I was only able to give my code place before the whole .text
segment (after the vectors) or after the whole .text segment, but I was not
able to put my constants to specific address somewhere "inside" the .text
segment.

-----Original Message-----
From: David Kelly [mailto:address@hidden 
Sent: Wednesday, December 19, 2007 6:45 PM
To: address@hidden
Cc: address@hidden
Subject: Re: [avr-gcc-list] Howto put constants on fixed address

On Wed, Dec 19, 2007 at 06:07:19PM +0100, address@hidden wrote:
> Well, perhaps I've written something wrong, because I think that you 
> are talking about something else. Or I did not understand that, that 
> is also possible :-).
> 
> I need to put my constants on specific address into flash memory, not 
> into sram. I want to have the resulting flash content like this:
> 
> 0000-03FF    some part of .text section (including vectors and so on)
> 0400-041F    my .foo section
> 0420-end     the rest of .text section

I have done this in Introl-C11 where I had external memory mapped I/O
registers. I had to manually massage the linker editor script file. For
avr-gcc this will be in /usr/local/avr/lib/ldscripts/ (or similar in
WinAVR). But you don't want to edit those but to copy one into your project
and figure out how to override the default with your own.

Due to the memory map I had I/O in the midst of my EPROM space. Once I got
the Introl linker working the way I wanted it nicely split my object code
around the I/O sections.

One must question the need to map constants to a predetermined location in
FLASH?

--
David Kelly N4HHE, address@hidden
========================================================================
Whom computers would destroy, they must first drive mad.







reply via email to

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