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

ARM7: Filling Internal RAM of the processor

Hi,

I wish to access & modify the contents of the internal RAM of the ARM7. How do I do that. I know that in the assembly file, there is a define statement for the starting of the RAM. But how do I access the contents (in fact the whole memory) from C code?

Thanks in advance,
avani

Parents
  • Avani,

    The RAM sections are defined via Target Dialog inside uVision, please refer to your device user's manual to see what valid RAM addresses are.

    To access RAM in C you may use a pointer. Anything in ARM will be pretty much done via pointers ( load-store characteristic ), in ASM you probably used LDR and STR instructions nothing fancy to be used on that purpose.

    C language doesn't know where your memory start/stop. It's your job to manage the access considering address and memory boundary ( check Thumb and ARM mode ).

    Hope it helps.

    Alex

Reply
  • Avani,

    The RAM sections are defined via Target Dialog inside uVision, please refer to your device user's manual to see what valid RAM addresses are.

    To access RAM in C you may use a pointer. Anything in ARM will be pretty much done via pointers ( load-store characteristic ), in ASM you probably used LDR and STR instructions nothing fancy to be used on that purpose.

    C language doesn't know where your memory start/stop. It's your job to manage the access considering address and memory boundary ( check Thumb and ARM mode ).

    Hope it helps.

    Alex

Children
  • Hi Alex,

    Yaa i thought that I would have to use the assembly level instructions in order to access it. So, I had started to access RAM via LDR, STR instructions. Was a bit skeptic whether it can be done using C level, which I am more used to.

    Thanks a lot for your help,
    Avani

  • Yaa i thought that I would have to use the assembly level instructions in order to access it.

    No, you don't have to. Use pointers, just as Alex said. For information on how pointers work in C, consult your favorite C textbook. Pointers are not specific to ARM, they work on all architectures.