Fix for simulator build and improve ESP-IDF build (#432)

This commit is contained in:
Ken Van Hoeylandt 2025-12-22 21:16:51 +01:00 committed by GitHub
parent 6c4a9975a4
commit 134e0b34b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 6 deletions

View File

@ -16,6 +16,8 @@ CONFIG_LV_USE_MSGBOX=n
CONFIG_LV_USE_SPINNER=n CONFIG_LV_USE_SPINNER=n
CONFIG_LV_USE_WIN=n CONFIG_LV_USE_WIN=n
CONFIG_LV_USE_SNAPSHOT=y CONFIG_LV_USE_SNAPSHOT=y
CONFIG_LV_BUILD_EXAMPLES=n
CONFIG_LV_BUILD_DEMOS=n
CONFIG_FREERTOS_HZ=1000 CONFIG_FREERTOS_HZ=1000
CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2 CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2
CONFIG_FREERTOS_SMP=n CONFIG_FREERTOS_SMP=n

View File

@ -104,7 +104,9 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION})
add_subdirectory(Libraries/SDL) # Added as idf component for ESP and as library for other targets add_subdirectory(Libraries/SDL) # Added as idf component for ESP and as library for other targets
# LVGL # LVGL
add_compile_definitions($<$<BOOL:${LV_USE_DRAW_SDL}>:LV_USE_DRAW_SDL=1>) set(CONFIG_LV_BUILD_DEMOS OFF CACHE BOOL "" FORCE)
set(CONFIG_LV_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(CONFIG_LV_USE_DRAW_SDL ON CACHE BOOL "" FORCE)
add_subdirectory(Libraries/lvgl) # Added as idf component for ESP and as library for other targets add_subdirectory(Libraries/lvgl) # Added as idf component for ESP and as library for other targets
target_link_libraries(lvgl PRIVATE SDL2-static) target_link_libraries(lvgl PRIVATE SDL2-static)

View File

@ -2,6 +2,8 @@
#ifdef ESP_PLATFORM #ifdef ESP_PLATFORM
#include <tt_init.h> #include <tt_init.h>
#else
#include <Simulator.h>
#endif #endif
// Each board project declares this variable // Each board project declares this variable

View File

@ -1,6 +1,4 @@
file(GLOB SOURCES "cJSON/*.c")
add_library(cJSON STATIC) add_library(cJSON STATIC)
target_sources(cJSON PRIVATE ${SOURCES}) target_sources(cJSON PRIVATE cJSON/cJSON.c cJSON/cJSON_Utils.c)
include_directories(cJSON "cJSON/") include_directories(cJSON "cJSON/")
target_include_directories(cJSON PUBLIC "cJSON/") target_include_directories(cJSON PUBLIC "cJSON/")

View File

@ -167,7 +167,7 @@
#define LV_USE_DRAW_DAVE2D 0 #define LV_USE_DRAW_DAVE2D 0
/* Draw using cached SDL textures*/ /* Draw using cached SDL textures*/
#define LV_USE_DRAW_SDL 0 #define LV_USE_DRAW_SDL 1
/* Use VG-Lite GPU. */ /* Use VG-Lite GPU. */
#define LV_USE_DRAW_VG_LITE 0 #define LV_USE_DRAW_VG_LITE 0
@ -902,12 +902,14 @@
*==================*/ *==================*/
/*Enable the examples to be built with the library*/ /*Enable the examples to be built with the library*/
#define LV_BUILD_EXAMPLES 1 #define LV_BUILD_EXAMPLES 0
/*=================== /*===================
* DEMO USAGE * DEMO USAGE
====================*/ ====================*/
#define LV_BUILD_DEMOS 0
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */ /*Show some widget. It might be required to increase `LV_MEM_SIZE` */
#define LV_USE_DEMO_WIDGETS 0 #define LV_USE_DEMO_WIDGETS 0
#if LV_USE_DEMO_WIDGETS #if LV_USE_DEMO_WIDGETS