Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] How to specify the location of an object in memory (GNU)

2005-11-01 by Tom Walsh

Tom Walsh wrote:

>Michel Kuenemann wrote:
>
>  
>
>>Dear LPC2000 Group,
>>
>>I am using the KEIL IDE for ARM7 processors with the GNU Cygnus compiler on
>>a LPC2106 target. My
>>problem is that I cannot find in the documentation how to tell the compiler
>>to locate an object at a specified place (somwhere in flash memory, for
>>instance).
>>
>> 
>>
>>    
>>
>That would be the linker that would do the physical location of things.
>
>Compilers build relocatable objects, linkers place those into regions 
>that you specify in the linker file (script).
>
>  
>

Go here: http://www.openhardware.net

Then under "Documents Lib" select "Absolute Linking with gcc".  In that 
document, look at page 5 to see how things get hardcoded to an absolute 
address.  The document is rather old, I wrote it a number of years ago, 
however, it is still pertinent to what we do today with the linker.

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.