Beginner Lab 11: Memory Map Exploration

Last modified by Microchip on 2026/06/26 07:40

Objective

  1. Reinforce understanding of Arm® Cortex®-M memory organization and memory map structure.
  2. Access and observe variables stored in SRAM using the debugger.
  3. Read and analyze peripheral registers through memory-mapped Input/Output (I/O).
  4. Explore system control space and system registers using debugging tools.
  5. 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).

Download the ZIP file for this lab.

Information

The contents of this ZIP file need to be placed in the following folder:

<Any directory of the user's choice>/
(example Directory = C:/microchip/harmony/v3)

Note:

  1. An MPLAB® Harmony v3 project can be created in any directory. Its location does not depend on the MPLAB Harmony framework path, so it does not need to be placed under the Harmony v3 framework folder or in any relative path beneath it.
  2. This is possible because the project generates its required files locally. When an MPLAB Harmony v3 project is created, all referenced source files, header files, and libraries, if applicable, are generated within the project folder.

Lab Index

  1. PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit
  2. MPLAB X Integrated Development Environment (IDE)
  3. MPLAB XC32 Compiler
  4. PIC32CM LS00 Curiosity Nano+ Touch Evaluation Kit: EV41C56A User Guide
  5. Ultra-Low Power, Secure, and Enhanced Touch MCU: PIC32CM LE00/LS00/LS60 Data Sheet 

Back to Top