diff --git a/env_support/cmake/esp.cmake b/env_support/cmake/esp.cmake index 591a9b07e0..7ce11df4ff 100644 --- a/env_support/cmake/esp.cmake +++ b/env_support/cmake/esp.cmake @@ -55,7 +55,7 @@ else() set(IDF_COMPONENTS esp_timer log) - if(${target} STREQUAL "esp32p4") + if(${target} STREQUAL "esp32p4" OR ${target} STREQUAL "esp32s31") list(APPEND IDF_COMPONENTS esp_driver_ppa esp_mm) endif() diff --git a/src/draw/espressif/ppa/lv_draw_ppa_private.h b/src/draw/espressif/ppa/lv_draw_ppa_private.h index e87b966104..a1323f2d37 100644 --- a/src/draw/espressif/ppa/lv_draw_ppa_private.h +++ b/src/draw/espressif/ppa/lv_draw_ppa_private.h @@ -31,8 +31,16 @@ extern "C" { /* The ppa driver depends heavily on the esp-idf headers*/ #include -#if (CONFIG_LV_DRAW_BUF_ALIGN != CONFIG_CACHE_L2_CACHE_LINE_SIZE) -#error "CONFIG_LV_DRAW_BUF_ALIGN must be equal to CONFIG_CACHE_L2_CACHE_LINE_SIZE!" +#if defined(CONFIG_CACHE_L2_CACHE_LINE_SIZE) +#define LV_DRAW_PPA_CACHE_LINE_SIZE CONFIG_CACHE_L2_CACHE_LINE_SIZE +#elif defined(CONFIG_CACHE_L1_DCACHE_LINE_SIZE) +#define LV_DRAW_PPA_CACHE_LINE_SIZE CONFIG_CACHE_L1_DCACHE_LINE_SIZE +#else +#error "Cannot determine the data cache line size for the PPA draw unit" +#endif + +#if (CONFIG_LV_DRAW_BUF_ALIGN != LV_DRAW_PPA_CACHE_LINE_SIZE) +#error "CONFIG_LV_DRAW_BUF_ALIGN must be equal to the data cache line size!" #endif