how to store a variable in a particular memory location

we are designing DATA loggers for Railways. For that we are using 2468 ARM processor. while designing the system we have an issue that

all local variables should be stored in INTERNAL RAM (64k) & all GLOBAL VARIABLES
should be stored in EXTERNAL SDRAM.

is this feature available in KEIL ARM if so how to configure it.

Another one is how to STORE a variable in a particular memory location (global or local variable) in Keil compiler..

can any one help me.........

Parents
  • Before considering how to do this, please explain why you think you need to do it - there may well be better ways to achieve whatever it is that you're trying to do!

    The assignment of program "objects" (functions, variables) to hardware memory addresses is done by the Linker - so you need to be studying the Linker manual for that.

    The compiler does have facilities to assign an absolute memory address to a variable; see the Compiler manual - but, again, why you think you need to do it?

Reply
  • Before considering how to do this, please explain why you think you need to do it - there may well be better ways to achieve whatever it is that you're trying to do!

    The assignment of program "objects" (functions, variables) to hardware memory addresses is done by the Linker - so you need to be studying the Linker manual for that.

    The compiler does have facilities to assign an absolute memory address to a variable; see the Compiler manual - but, again, why you think you need to do it?

Children
More questions in this forum