spi_flash_mmap_pages() function
Map sequences of pages of flash memory into data or instruction address space This function allocates sufficient number of 64kB MMU pages and configures them to map the indicated pages of flash memory contiguously into address space. In this respect, it works in a similar way as spi_flash_mmap() but it allows mapping a (maybe non-contiguous) set of pages into a contiguous region of memory.
Arguments
pages
An array of numbers indicating the 64kB pages in flash to be mapped contiguously into memory. These indicate the indexes of the 64kB pages, not the byte-size addresses as used in other functions. Array must be located in internal memory.
page_count
Number of entries in the pages array
memory
Address space where the region should be mapped (instruction or data)
out_ptr
Output, pointer to the mapped memory region
out_handle
Output, handle which should be used for spi_flash_munmap call
Return value
- ESP_OK on success - ESP_ERR_NO_MEM if pages can not be allocated - ESP_ERR_INVALID_ARG if pagecount is zero or pages array is not in internal memory
spi_flash_mmap_pages() calls 7 functions:
![]()
spi_flash_mmap_pages()
spi_flash_mmap_pages() reads 6 variables and writes 2 variables:
![]()
spi_flash_mmap_pages()
spi_flash_mmap_pages() allocates 1 types:
![]()
spi_flash_mmap_pages()