--- In lpc2000@yahoogroups.com, "gomolava1" <gomolava1@y...> wrote:
>
> Is it exist simple method to place an ARRAY to a fixed memory
> location in gcc,like in Keil:
> const unsigned char eeprom[EE_SIZE]_at_EE_ADDR_L;
>
> For a variable
> unsigned int dd _at_ 0x81000000;
>
> previous answers suggested:
> int * dd = ((unsigned int *)0x81000000);
>
> Have I to use separate section in linker script?
You don't have to. You can also use a pointer to access an array:
unsigned char *eeprom = (unsigned char *)0x81000000;
...
i = eeprom[34];
and to access a struct:
struct eedata
{
int ee1;
int ee2;
};
struct eedata *pe = (struct eedata *)0x81000000;
...
i = pe->ee1;
Karl OlsenMessage
Re: Fixed address ARRAY
2005-11-29 by Karl Olsen
Attachments
- No local attachments were found for this message.