This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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 Reply Children
  • In fact, all of the toolset manuals!

    You said yourself this is not a trivial project - so you need to be properly prepared by making a thorough study of the necessary documentation!

  • The problem is i'm new to this job (project). I have no idea about this project. from last 10 years our company supplying data loggers to Indian Railways. now we want to release the new verson Data loggers. i don't know exactly my role in this project. my manager assigning me some small tasks like the queries previously i asked .thats way i am not giving clarity while asking the questions. once again thanque Ande Neil for ur valuable suggessions.

  • "i'm new to this job (project)"

    Do you have any prior experience with embedded microcontroller development?

    "I have no idea about this project ... i don't know exactly my role in this project"

    You urgently need to get these things clarified with your management!

    "my manager assigning me some small tasks like the queries previously i asked"

    You really need to ensure that you understand your assigned tasks!

  • i have no prior experience in embedded controllers.

  • It's possible to move special variables to a separate source file and have the linker place them in a separate memory segment.

    Or just access large log variables in separate segment using pointers - basiaclly just statically allocate the memory as one or more arrays of something. This works well if it's a question of storing scratch or log data separately.

  • Yes, of course it is possible - but is it a good idea?

    If the OP can't give any reason(s) for doing this - let alone any good reasons - how can he tell whether any suggestions received here are actually appropriate to the requirement?

  • The only really good reason is to dedicate a fixed memory region as protected without zero-init.

    And it is also possible to update firmware without losing the logged data.

    But obviously, special memory regions are special for a reason - to solve a special problem. If the OP doesn't know he has a special problem, then he probably don't need to allocate some variables to a special memory region.

    Special solutions should never be used without any special problems to solve. And many special problems can be rewritten to fit non-special solutions.