Embedded Systems Fundamentals · Interview question

What is a memory map and why does it matter?

A strong answer

A memory map is the fixed assignment of address ranges in the CPU's flat address space to different resources, which addresses are flash, which are SRAM, which are peripheral registers, which are core/system blocks. It's defined by the chip designer and fixed in silicon, and on a 32-bit Cortex-M it spans the full 4 GB space with ARM standardizing the broad bands and the vendor placing flash/SRAM/peripherals within them. It matters because your linker script must match it exactly: code and the vector table must be located at the flash base, the initial stack pointer must point into real SRAM, and section placement (.data, .bss) must land in valid RAM. Get any of it wrong and the image won't boot or will fault immediately. It's also why register programming works, peripheral registers occupy known map addresses you access by pointer.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

The Memory Map

Why code lives at 0x08000000 and variables at 0x20000000: the Cortex-M address layout of flash, SRAM, and peripherals, and how stack and heap share the SRAM with no MMU to referee.

More The Memory Map questions

Browse all 472 interview questions