can anyone give me a example code to store a structure in particular memory address.
Structure consist of data members (a) string (b)pointer to next structure.
Please reply,thanks in advance
I prefer the placement specification in the linker file and name the section where you want to place those symbols. Because the linker is responsible about symbol placement, it is good approach to define it in the linker file. And it is good to have everything related to the symbol placement in one file instead of many.
That is compiler specific so you have to look at the compiler you are using and determine from their documentation how best to accomplish that.
If you are using codewarrior the forum for that is:
GCC uses __attribute__ specifiers to place variables into sections. Your linker script then has to allocate those sections to the correct addresses
ARMCC (Keil) also use the __attribute__ specifiers just as GCC but also has the ability to use the specifer "at" which allows you to directly place a variable (or structure) at the given address without having to change your scatter file.