Skip to content

Conversation

AndreCostaaa
Copy link
Collaborator

@AndreCostaaa AndreCostaaa commented Oct 13, 2025

This is a proposal to not use lv_conf.h in this repository and instead use lv_conf.defaults

lv_conf.h is generated at build time using Cmake from lv_conf.defaults


Summary by cubic

Generate lv_conf.h at build time from lv_conf.defaults via CMake to simplify LVGL configuration and remove the tracked header. This reduces config drift and makes per-build tweaks easier.

  • Refactors

    • Generate lv_conf.h using lvgl/scripts/generate_lv_conf.py with lv_conf_template.h and lv_conf.defaults.
    • Configure CMake to place the generated lv_conf.h in the build directory and fail fast on errors.
    • Remove the committed lv_conf.h from the repo.
    • Refresh lv_conf.defaults for our Linux FBDEV + EVDEV setup, enabling vector graphics, TTF, common image decoders, logging, and selected demos; adjust render mode and buffer settings.
  • Migration

    • Edit lv_conf.defaults to change LVGL settings; do not add lv_conf.h back.
    • Ensure Python 3 is available during configure/build.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="CMakeLists.txt">

<violation number="1" location="CMakeLists.txt:29">
LV_CONF_DEFAULTS_PATH points to lv_conf_3d.defaults, but that file is absent from the repo, so configure_file will fail and the build cannot proceed.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

CMakeLists.txt Outdated
CACHE PATH "path to lv_conf.h" FORCE)

set(LVGL_TEMPLATE_PATH "${CMAKE_SOURCE_DIR}/lvgl/lv_conf_template.h")
set(LV_CONF_DEFAULTS_PATH "${CMAKE_SOURCE_DIR}/lv_conf_3d.defaults")
Copy link

@cubic-dev-ai cubic-dev-ai bot Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LV_CONF_DEFAULTS_PATH points to lv_conf_3d.defaults, but that file is absent from the repo, so configure_file will fail and the build cannot proceed.

Prompt for AI agents
Address the following comment on CMakeLists.txt at line 29:

<comment>LV_CONF_DEFAULTS_PATH points to lv_conf_3d.defaults, but that file is absent from the repo, so configure_file will fail and the build cannot proceed.</comment>

<file context>
@@ -21,6 +21,36 @@ set(CMAKE_C_FLAGS &quot;${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic&quot;)
+    CACHE PATH &quot;path to lv_conf.h&quot; FORCE)
+
+set(LVGL_TEMPLATE_PATH &quot;${CMAKE_SOURCE_DIR}/lvgl/lv_conf_template.h&quot;)
+set(LV_CONF_DEFAULTS_PATH &quot;${CMAKE_SOURCE_DIR}/lv_conf_3d.defaults&quot;)
+set(GENERATE_SCRIPT_PATH &quot;${CMAKE_SOURCE_DIR}/lvgl/scripts/generate_lv_conf.py&quot;)
+
</file context>
Suggested change
set(LV_CONF_DEFAULTS_PATH "${CMAKE_SOURCE_DIR}/lv_conf_3d.defaults")
set(LV_CONF_DEFAULTS_PATH "${CMAKE_SOURCE_DIR}/lv_conf.defaults")

✅ Addressed in 0154606

@AndreCostaaa AndreCostaaa force-pushed the build-use-lv-conf-defaults branch from dffc16e to 36858f2 Compare October 13, 2025 09:26
@AndreCostaaa AndreCostaaa force-pushed the build-use-lv-conf-defaults branch from 36858f2 to 17665ea Compare October 13, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant