How to specify the location of an object in memory (GNU)

Started by Michel Kuenemann November 1, 2005
I do this a lot when I want to lock variables in RAM across different firmware versions. That way the data structures are at the same place no matter if the firmware gets updated. That is important for some of my code where I am doing a lot of IAP between ROM and RAM.

All I do is define a type, then a pointer for that type, and then assign a hard adr value to that pointer. Easy.

Chris. ----- Original Message -----
From: Michel Kuenemann
To: lpc2000@lpc2...
Sent: Tuesday, November 01, 2005 10:17 AM
Subject: [lpc2000] How to specify the location of an object in memory (GNU) 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

In another IDE I am using, I would write :

at 0x00016000 int base;

Can someone help me ?

Thank you.

Michel Kuenemann
KMS - France

SPONSORED LINKS Microprocessor Microcontrollers Pic microcontrollers
8051 microprocessor ------

a.. ------

An Engineer's Guide to the LPC2100 Series