1# Partition Memory Map Example
2
3This example demonstrates how to use `esp_partition_mmap` to configure MMU and map a partition into memory address space for read operations.
4
5# Example Flow
6
7The example uses a [custom partition table](./partitions_example.csv), with a data partition `storage` used for demonstration. Before mapping this partition to memory,
8data is written to the partition used for verification.
9
10The partition API function `esp_partition_mmap` is used to get a pointer to the mapped memory region and a handle to the mapping. The pointer is used to transparently read back the
11verification data written previously. Once the data written and read are verified to be the same, the function `spi_flash_munmap` is used to release the mapping.
12
13### Output
14```
15I (309) example: Written sample data to partition: ESP-IDF Partition Memory Map Example
16I (309) example: Mapped partition to data memory address 0x3f410000
17I (319) example: Read sample data from partition using mapped memory: ESP-IDF Partition Memory Map Example
18I (329) example: Data matches
19I (329) example: Unmapped partition from data memory
20I (339) example: Example end
21```
22
23# Others
24
25Detailed functional description of partition API is provided in [documentation](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/storage/spi_flash.html).
26
27See the README.md file in the upper level 'examples' directory for more information about examples.
28