Skip to content

LVGL9.2 ESP32 IDF build Error #12

@666wsp

Description

@666wsp

Hello! I ported eez-framework to esp32 idf architecture and compiled it with lvgl9.2, idf5.4.0 and it reported an error with two main parts:

The first part of the error is as follows:

  1. error: invalid use of incomplete type 'lv_roller_t' {aka 'struct lv_roller_t'}
    300 | size_t numPages = roller->inf_page_cnt;
    The second part reports an error:
    2, /eez-framework/src/eez/flow/components/lvgl.cpp:224:63: error: invalid conversion from 'lv_state_t' {aka 'short unsigned int'} to 'lv_obj_ flag_t' [-fpermissive]
    224 | if (booleanValue) lv_obj_add_flag(target, flag);
    | ^~~~
    | ^~~~
    | lv_state_t {aka short unsigned int}

components/eez-framework/src/eez/flow/components/lvgl.cpp:225:52: error: invalid conversion from 'lv_state_t' {aka 'short unsigned int'} to ' lv_obj_flag_t' [-fpermissive]
225 | else lv_obj_clear_flag(target, flag); | lv_obj_clear_flag(target, flag); lv_obj_flag(target, flag)
| ^~~~
| ^~~~
| lv_state_t {aka short unsigned int}

I can't fix the first part of the error, I don't know where it's caused by not setting the right settings, the second part of the error looks like the book data type doesn't match, I forced the type conversion so it won't report the error, forced the type code: if (booleanValue) lv_obj_add_flag(target, (lv_obj_flag_t)flag); else lv_obj_clear_flag(target, flag); ^~~~ | | lv_state_t {aka short unsigned int}
else lv_obj_clear_flag(target, (lv_obj_flag_t)flag);

Translated with DeepL.com (free version)

I compiled the cmake configuration as follows
`if(ESP_PLATFORM)
file(GLOB_RECURSE SOURCES
./src/eez/.cpp
./src/eez/
.c
)

idf_component_register(
    SRCS ${SOURCES}
    INCLUDE_DIRS ./src ./src/eez/libs/agg
    REQUIRES lvgl__lvgl
)

target_compile_definitions(
    ${COMPONENT_LIB}
    PUBLIC EEZ_FOR_LVGL LV_LVGL_H_INCLUDE_SIMPLE)

target_compile_options(
    ${COMPONENT_LIB}
    PRIVATE -Wno-error=dangling-pointer)

else()
cmake_minimum_required(VERSION 3.12)

include_directories(
    ./src
    ./src/eez/libs/agg
)

file(GLOB_RECURSE SOURCES
    ./src/eez/*.cpp
    ./src/eez/*.c
)

ADD_LIBRARY(eez-framework STATIC ${SOURCES})

target_include_directories(eez-framework SYSTEM PUBLIC ./src ./src/eez/libs/agg)

endif()
`
Under lvgl 8.4 I followed this cmake and it works fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions