#include "esp_flash_encrypt.h"
#include "esp_log.h"
#include "cache_utils.h"
+#include "esp_spiram.h"
#ifndef NDEBUG
// Enable built-in checks in queue.h in debug builds
return ESP_ERR_INVALID_ARG;
}
}
- mmap_entry_t* new_entry = (mmap_entry_t*) malloc(sizeof(mmap_entry_t));
+ mmap_entry_t* new_entry = (mmap_entry_t*) heap_caps_malloc(sizeof(mmap_entry_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
if (new_entry == 0) {
return ESP_ERR_NO_MEM;
}
entire cache.
*/
if (!did_flush && need_flush) {
+#if CONFIG_SPIRAM_SUPPORT
+ esp_spiram_writeback_cache();
+#endif
Cache_Flush(0);
Cache_Flush(1);
}
tricky because mmaped memory can be used on un-pinned
cores, or the pointer passed between CPUs.
*/
+#if CONFIG_SPIRAM_SUPPORT
+ esp_spiram_writeback_cache();
+#endif
Cache_Flush(0);
#ifndef CONFIG_FREERTOS_UNICORE
Cache_Flush(1);