Beginner Lab 11: Memory Map Exploration
Objective
- Reinforce understanding of Arm® Cortex®-M memory organization and memory map structure.
- Access and observe variables stored in SRAM using the debugger.
- Read and analyze peripheral registers through memory-mapped Input/Output (I/O).
- Explore system control space and system registers using debugging tools.
- Visualize the separation of code memory, SRAM, and peripheral regions within the microcontroller.
Overview
This lab introduces the memory organization of Arm Cortex-M microcontrollers. The focus is on exploring how program code, data, and hardware registers are mapped into different memory regions. Using the debugger, one will observe variables stored in SRAM, access peripheral registers through memory-mapped I/O, and examine the system control space. This activity emphasizes the importance of understanding memory layout for debugging and efficient embedded system design. The exercise focuses on conceptual reinforcement and visualization of memory regions within the microcontroller.
Lab Activities
- Review the Arm Cortex-M memory map, including Flash, SRAM, peripheral region, and system control space.
- Write a simple program and observe the memory location of variables stored in SRAM using the debugger.
- Access and read selected peripheral registers through the memory view to understand memory-mapped peripherals.
- Explore the system control space using debugger tools and identify key system registers.
- Compare and identify addresses corresponding to code memory, SRAM, and peripheral regions.
Expected Outcomes
Upon completing this lab, you will be able to:
- Identify and interpret different regions of the Arm Cortex-M memory map.
- Access and observe variables stored in SRAM using debugging tools.
- Understand how peripheral registers are mapped into memory space.
- Visualize code memory, SRAM, and peripheral regions within the microcontroller.
- Strengthen debugging and memory analysis skills for embedded systems.
Lab Source Files and Solutions
This ZIP file contains the completed solution project for this lab. It also contains the source files needed to perform the lab as per the following step-by-step instructions (see the "Lab Index" section on this page).
for this lab.
Lab Index
- Step 1: Arm Cortex-M Memory Organization
- Step 1.1 - Memory Organization of PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit
- Step 1.2 - Flash Memory (Program Memory)
- Step 1.3 - Data Flash (Non-Volatile Data Storage)
- Step 1.4 - SRAM (Static RAM)
- Step 1.5 - TrustRAM
- Step 1.6 - Boot ROM
- Step 1.7 - Secure and Non-Secure Memory Partitioning
- Step 1.8 - Memory Protection Mechanisms
- Step 2: Configuration of MCC
- Step 2.1 - Configuration of MCC
- Step 3: Generate Code
- Step 3.1 - Generate Code
- Step 4: Add Application Code to the Project
- Step 4.1 - Add application code to the project
- Step 5: Build, Program and Observe the Output
- Step 5.1 - Hardware Setup
- Step 5.2 - Building the project
- Step 5.3 - Debugging and Observing the output