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: David Kelly
Subject: Re: [avr-gcc-list] Howto put constants on fixed address
Date: Wed, 19 Dec 2007 11:44:34 -0600
User-agent: Mutt/1.4.2.3i

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]