• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

main/11-Mar-2024-7028

CMakeLists.txtD11-Mar-2024238 75

MakefileD11-Mar-2024185 92

README.mdD11-Mar-20241.4 KiB2819

partition_mmap_example_test.pyD11-Mar-2024874 2415

partitions_example.csvD11-Mar-2024320 76

sdkconfig.ciD11-Mar-2024153 43

sdkconfig.defaultsD11-Mar-2024153 43

README.md

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