From dc0c8915b0b7793ac51baa682c03389bb2718262 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Tue, 27 Feb 2024 18:15:58 +1100 Subject: [PATCH] ESP-IDF 5.2 (#49) - Updated IDF from 5.1.2 to 5.2 - Updated FreeRTOS from 10.4.6 to 10.5.1 - Updated M5GFX with bugfix for IDF 5.2 - FreeRTOS-Kernel is now a submodule --- .github/workflows/esp.yml | 8 ++++---- .gitmodules | 7 ++++++- CMakeLists.txt | 13 +++++++------ README.md | 4 ++-- app-esp/idf_component.yml | 2 +- boards/m5stack_core2/source/bootstrap.cpp | 2 +- libs/M5GFX | 2 +- sdkconfig.board.lilygo_tdeck | 2 ++ sdkconfig.board.m5stack_core2 | 2 ++ sdkconfig.board.waveshare_s3_touch | 2 ++ sdkconfig.board.yellow_board | 2 ++ sdkconfig.defaults | 2 ++ 12 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.github/workflows/esp.yml b/.github/workflows/esp.yml index c8594e95..a8f73dca 100644 --- a/.github/workflows/esp.yml +++ b/.github/workflows/esp.yml @@ -13,7 +13,7 @@ jobs: - name: build uses: espressif/esp-idf-ci-action@main with: - esp_idf_version: v5.1.2 + esp_idf_version: v5.2 target: esp32 path: './' build-lilygo-t-deck: @@ -28,7 +28,7 @@ jobs: - name: build uses: espressif/esp-idf-ci-action@main with: - esp_idf_version: v5.1.2 + esp_idf_version: v5.2 target: esp32s3 path: './' build-waveshare-s3-touch: @@ -43,7 +43,7 @@ jobs: - name: build uses: espressif/esp-idf-ci-action@main with: - esp_idf_version: v5.1.2 + esp_idf_version: v5.2 target: esp32s3 path: './' build-m5stack-core2: @@ -58,6 +58,6 @@ jobs: - name: build uses: espressif/esp-idf-ci-action@main with: - esp_idf_version: v5.1.2 + esp_idf_version: v5.2 target: esp32 path: './' diff --git a/.gitmodules b/.gitmodules index 96188fec..e74a5036 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,11 @@ [submodule "libs/M5GFX"] path = libs/M5GFX - url = https://github.com/m5stack/M5GFX.git + url = https://github.com/KenVanHoeylandt/M5GFX.git + branch = develop [submodule "libs/M5Unified"] path = libs/M5Unified url = https://github.com/m5stack/M5Unified.git +[submodule "libs/freertos-kernel"] + path = libs/freertos-kernel + url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git + branch = V10.5.1 diff --git a/CMakeLists.txt b/CMakeLists.txt index f3e77541..86e49d85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,8 @@ add_subdirectory(libs/mlib) add_subdirectory(libs/lv_screenshot) if (NOT DEFINED ENV{ESP_IDF_VERSION}) + set(FREERTOS_CONFIG_FILE_DIRECTORY "${PROJECT_SOURCE_DIR}/app-sim/src" CACHE STRING "") + set(FREERTOS_PORT GCC_IA32_FLAT CACHE STRING "") add_subdirectory(libs/freertos-kernel) target_include_directories(freertos-kernel PUBLIC app-sim/src # for FreeRTOSConfig.h @@ -60,18 +62,17 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION}) add_subdirectory(tests) # region SDL & LVGL + set(LV_CONF_PATH ${PROJECT_SOURCE_DIR}/app-sim/src/lv_conf.h) + add_subdirectory(libs/lvgl) # Added as idf component for ESP and as library for other targets + target_include_directories(lvgl + PUBLIC app-sim/src # for lv_conf.h and lv_drv_conf.h + ) # TODO: This is a temporary skipping option for running unit tests # TODO: Remove when github action for SDL is working again if (NOT DEFINED ENV{SKIP_SDL}) find_package(SDL2 REQUIRED CONFIG) - add_subdirectory(libs/lvgl) # Added as idf component for ESP and as library for other targets - target_include_directories(lvgl - PUBLIC ${SDL2_INCLUDE_DIRS} - PUBLIC app-sim/src # for lv_conf.h and lv_drv_conf.h - ) - option(LV_USE_DRAW_SDL "Use SDL draw unit" OFF) option(LV_USE_LIBPNG "Use libpng to decode PNG" OFF) option(LV_USE_LIBJPEG_TURBO "Use libjpeg turbo to decode JPEG" OFF) diff --git a/README.md b/README.md index 26981ce3..5a35128b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Noteworthy features: Requirements: - ESP32 (any?) with a touchscreen -- [esp-idf 5.1.2](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/get-started/index.html) or a newer v5.1.x +- [esp-idf 5.2](https://docs.espressif.com/projects/esp-idf/en/v5.2/esp32/get-started/index.html) or a newer v5.2.x ## Making apps is easy! @@ -104,7 +104,7 @@ git clone --recurse-submodules -j8 https://github.com/ByteWelder/Tactility.git ### Build environment setup -Ensure you have [esp-idf 5.1.2](https://docs.espressif.com/projects/esp-idf/en/v5.1.2/esp32/get-started/index.html) installed, then select the correct device: +Ensure you have [esp-idf 5.2](https://docs.espressif.com/projects/esp-idf/en/v5.2/esp32/get-started/index.html) installed, then select the correct device: Copy the `sdkconfig.board.YOUR_BOARD` into `sdkconfig`. Use `sdkconfig.defaults` if you are setting up a custom board. diff --git a/app-esp/idf_component.yml b/app-esp/idf_component.yml index 753e2e10..b72a73d8 100644 --- a/app-esp/idf_component.yml +++ b/app-esp/idf_component.yml @@ -3,4 +3,4 @@ dependencies: espressif/esp_lcd_touch_cst816s: "^1.0.3" espressif/esp_lcd_touch_gt911: "^1.0.0" espressif/esp_lcd_touch: "1.1.1" - idf: '~5.1.2' + idf: '~5.2' diff --git a/boards/m5stack_core2/source/bootstrap.cpp b/boards/m5stack_core2/source/bootstrap.cpp index dea8dad5..fc2f0532 100644 --- a/boards/m5stack_core2/source/bootstrap.cpp +++ b/boards/m5stack_core2/source/bootstrap.cpp @@ -58,7 +58,7 @@ static bool init_spi2() { .data7_io_num = GPIO_NUM_NC, .max_transfer_sz = CORE2_SPI2_TRANSACTION_LIMIT, .flags = 0, - .isr_cpu_id = INTR_CPU_ID_AUTO, + .isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO, .intr_flags = 0 }; diff --git a/libs/M5GFX b/libs/M5GFX index 33d7d313..ba17bdf9 160000 --- a/libs/M5GFX +++ b/libs/M5GFX @@ -1 +1 @@ -Subproject commit 33d7d3135e816a86a008fae8ab3757938cee95d2 +Subproject commit ba17bdf930bca03725e0c976927e15146d1daa2f diff --git a/sdkconfig.board.lilygo_tdeck b/sdkconfig.board.lilygo_tdeck index 45913cc6..9fd866b6 100644 --- a/sdkconfig.board.lilygo_tdeck +++ b/sdkconfig.board.lilygo_tdeck @@ -11,6 +11,8 @@ CONFIG_LV_USE_BUILTIN_MALLOC=n CONFIG_LV_USE_CLIB_MALLOC=y CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2 +CONFIG_FREERTOS_SMP=n +CONFIG_FREERTOS_UNICORE=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" diff --git a/sdkconfig.board.m5stack_core2 b/sdkconfig.board.m5stack_core2 index 52890959..d3d1c2f3 100644 --- a/sdkconfig.board.m5stack_core2 +++ b/sdkconfig.board.m5stack_core2 @@ -11,6 +11,8 @@ CONFIG_LV_USE_BUILTIN_MALLOC=n CONFIG_LV_USE_CLIB_MALLOC=y CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2 +CONFIG_FREERTOS_SMP=n +CONFIG_FREERTOS_UNICORE=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" diff --git a/sdkconfig.board.waveshare_s3_touch b/sdkconfig.board.waveshare_s3_touch index 55708b56..b7b586f5 100644 --- a/sdkconfig.board.waveshare_s3_touch +++ b/sdkconfig.board.waveshare_s3_touch @@ -11,6 +11,8 @@ CONFIG_LV_USE_BUILTIN_MALLOC=n CONFIG_LV_USE_CLIB_MALLOC=y CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2 +CONFIG_FREERTOS_SMP=n +CONFIG_FREERTOS_UNICORE=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" diff --git a/sdkconfig.board.yellow_board b/sdkconfig.board.yellow_board index ad7fe3ba..e673db09 100644 --- a/sdkconfig.board.yellow_board +++ b/sdkconfig.board.yellow_board @@ -11,6 +11,8 @@ CONFIG_LV_USE_BUILTIN_MALLOC=n CONFIG_LV_USE_CLIB_MALLOC=y CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2 +CONFIG_FREERTOS_SMP=n +CONFIG_FREERTOS_UNICORE=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" diff --git a/sdkconfig.defaults b/sdkconfig.defaults index c334a772..de1f7945 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -11,6 +11,8 @@ CONFIG_LV_USE_BUILTIN_MALLOC=n CONFIG_LV_USE_CLIB_MALLOC=y CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2 +CONFIG_FREERTOS_SMP=n +CONFIG_FREERTOS_UNICORE=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"