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

Memory paradigm with ARM Cortex-MX

Hi guys,

I'm relatively new to ARM development and am moving from simpler micro-controllers where all memory is on-board.

I was hoping someone would be so kind as to help me understand the modern memory paradigm employed by a Cortex-M chip.

- Assuming I am using external SPIFI (NXP4350) to store my program, does the compiler handle generating stack data in RAM for me or is there some copying/fetching that must be done?

- If I had an external SRAM/SDRAM attached, is this a case of editing the location of stack and heap memory in the project to have it execute purely in the external memory, can I mix and match in any way?

- What approaches are typically employed by users on this forum?

Many thanks for any advice.

  • Assuming I am using external SPIFI (NXP4350) to store my program, does the compiler handle generating stack data in RAM for me or is there some copying/fetching that must be done?

    What is 'stack data' and why does it need 'generating'?

    If I had an external SRAM/SDRAM attached, is this a case of editing the location of stack and heap memory in the project to have it execute purely in the external memory, can I mix and match in any way?

    An external SRAM/SDRAM usually requires some initialization of MCU registers before it can be accessed. The initialization has to be done early in the boot process if you want external memory to be used for stack or code storage. AFAIK, you cannot do this by simply ticking checkboxes in the project options dialog.
    Luckily, you have complete control over your code: startup code can be rewritten if required, scatter files can be used to accomodate exotic memory layouts and so on.