Understanding the STM32 memory model
While the STM32 memory map consists of various memory areas, our primary focus in developing the linker script and startup file revolves around two critical areas: flash memory and static random access memory (SRAM). These areas are of utmost importance because they are directly involved in program storage. In the initial parts of this section, we will learn about the characteristics of these memory areas and the distinct roles they play.
Figure 4.1 shows a section of the stm32f411 memory map, highlighting the flash memory and SRAM.
Figure 4.1: A section of the STM32F11 memory map, highlighting the flash memory and SRAM areas
Let’s start with flash memory.
Flash memory
One of the primary advantages of flash memory is its non-volatile nature. This means that data stored in flash memory remains intact even when the power supply is disconnected. In STM32 microcontrollers (as well as other microcontrollers...