Cannot esp_partition_mmap() on ESP32-S3 code from a partition, but can do it as data (IDFGH-8961) #10373
Closed
3 tasks done
Labels
Resolution: Done
Issue is done internally
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v4.4.3
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1 v1.0
Power Supply used.
USB
What is the expected behavior?
I have a partition containing code that I would like to map into the memory space. I use esp_partition_mmap() for doing so on an existing project using ESP32 (ESP-WROVER-KIT), and I wanted to port my code on a ESP32-S3 chip.
The expected behaviour is simply that I expect my code partition to be loaded.
Effectivelly, when I ask the same partition to be loaded as data (SPI_FLASH_MMAP_DATA instead of SPI_FLASH_MMAP_INST), the code works (but my code cannot be executed).``
What is the actual behavior?
When exiting from esp_partition_mmap(), I get a ESP_ERR_NO_MEM error, and the code is not loaded.
Steps to reproduce.
Debug Logs.
More Information.
I tried to call esp_partition_read() to read and dump the partition to check if it can be accessed correctly. After verifying the first 16 bytes, it appears that the data I am expecting are there.
I also tried to call spi_flash_mmap() with the 3rd parameter being either SPI_FLASH_MMAP_INST or SPI_FLASH_MMAP_DATA. The partition is maped when using SPI_FLASH_MMAP_DATA, not when using SPI_FLASH_MMAP_INST.
Last, I tried to debug the function, and it appears that the error code is generated at the last steps of the debug when trying to find a place in the MMU pages or something like that.
Effectively the error comes from function spi_flash_mmap_pages() after the call to heap_caps_malloc()
The text was updated successfully, but these errors were encountered: