Sram in the ARM cortex m3

armcortex-m3memorystm32

I load a project into the chip STM32f103ZC whose internal sram is 48kBytes , there are also 2MBytes external sram on the board. But when I download and debug the project,the map file tells that 52KBytes read write memory has been used. Does it mean the ram? I think it doesn't exist error maybe because the linker command file makes 64KBytes for the ram just like the datasheet as below, but where is the extra data? Is it automatically stored in the external sram? I use the IAR under the Windows in C language.

enter image description here

Best Answer

Since your microcontroller has an external memory controller, I imagine the SRAM would be mapped directly onto the main address space. The memory map in the datasheet shows that 0x60000000 to 0x6fffffff is reserved for external SRAM (look for "FSMC" which is ST's name for their memory controller). This means that once properly configured, the MCU can access the external SRAM just like any other memory.

You can tell the linker where to locate variables and data using a configuration file. In IAR, such a file would end in .icf and are often found under the project directory. If you are using a development board, and the project you're loading is an example for that particular board, then the linker file may already be configured to place read/write data in the external SRAM.

Related Topic