esp32/mphalport: Enable D-cache flushing on P4 for native code.

This is necessary to get native code running on the ESP32-P4.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-12-01 10:46:43 +11:00
parent ff7f7449d2
commit bdf7613296
2 changed files with 7 additions and 0 deletions

View File

@@ -166,6 +166,7 @@ list(APPEND IDF_COMPONENTS
driver
esp_adc
esp_app_format
esp_mm
esp_common
esp_driver_touch_sens
esp_eth

View File

@@ -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;