summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/esp32/esp32_common.cmake1
-rw-r--r--ports/esp32/mphalport.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index a52498a7f..e3b1b81ca 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -166,6 +166,7 @@ list(APPEND IDF_COMPONENTS
driver
esp_adc
esp_app_format
+ esp_mm
esp_common
esp_driver_touch_sens
esp_eth
diff --git a/ports/esp32/mphalport.h b/ports/esp32/mphalport.h
index d779b6e66..a2b11520a 100644
--- a/ports/esp32/mphalport.h
+++ b/ports/esp32/mphalport.h
@@ -36,6 +36,7 @@
#include "freertos/task.h"
#include "driver/spi_master.h"
+#include "esp_cache.h"
#include "soc/gpio_reg.h"
#define MICROPY_PLATFORM_VERSION "IDF" IDF_VER
@@ -51,6 +52,11 @@
#define MP_TASK_COREID (1)
#endif
+#if CONFIG_IDF_TARGET_ESP32P4
+#define MP_HAL_CLEAN_DCACHE(data, len) \
+ esp_cache_msync((void *)(data), (len), ESP_CACHE_MSYNC_FLAG_UNALIGNED | ESP_CACHE_MSYNC_FLAG_DIR_C2M)
+#endif
+
extern TaskHandle_t mp_main_task_handle;
extern ringbuf_t stdin_ringbuf;