From 8ed743e527f2a5901046b5aed7fd61aaee0ad717 Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Fri, 10 Apr 2026 15:01:17 +0200 Subject: [PATCH] feat(wrover_kit): Add noglib menuconfig option --- bsp/esp_wrover_kit/Kconfig | 9 ++++++++- bsp/esp_wrover_kit/idf_component.yml | 2 ++ bsp/esp_wrover_kit/include/bsp/config.h | 11 +++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/bsp/esp_wrover_kit/Kconfig b/bsp/esp_wrover_kit/Kconfig index 1d03e786a..292a77ac1 100644 --- a/bsp/esp_wrover_kit/Kconfig +++ b/bsp/esp_wrover_kit/Kconfig @@ -33,7 +33,7 @@ menu "Board Support Package" endmenu menu "uSD card - Virtual File System" - config BSP_uSD_FORMAT_ON_MOUNT_FAIL + config BSP_SD_FORMAT_ON_MOUNT_FAIL bool "Format uSD card if mounting fails" default n help @@ -47,6 +47,13 @@ menu "Board Support Package" endmenu menu "Display" + config BSP_LVGL_INTEGRATION + bool "Build BSP with LVGL integration" + default y + help + When enabled, BSP headers and sources include LVGL and esp_lvgl_port. + Note: Run idf.py update-dependencies after changing this setting. + config BSP_DISPLAY_BRIGHTNESS_LEDC_CH int "LEDC channel index" default 1 diff --git a/bsp/esp_wrover_kit/idf_component.yml b/bsp/esp_wrover_kit/idf_component.yml index aac7b0311..36ea3b238 100644 --- a/bsp/esp_wrover_kit/idf_component.yml +++ b/bsp/esp_wrover_kit/idf_component.yml @@ -15,6 +15,8 @@ dependencies: version: "^2" public: true override_path: "../../components/esp_lvgl_port" + matches: + - if: "$CONFIG{BSP_LVGL_INTEGRATION} == True" button: version: "^4" diff --git a/bsp/esp_wrover_kit/include/bsp/config.h b/bsp/esp_wrover_kit/include/bsp/config.h index f3cb5ebe7..031b61902 100644 --- a/bsp/esp_wrover_kit/include/bsp/config.h +++ b/bsp/esp_wrover_kit/include/bsp/config.h @@ -1,16 +1,19 @@ /* - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once +#include "sdkconfig.h" + /************************************************************************************************** * BSP configuration **************************************************************************************************/ -// By default, this BSP is shipped with LVGL graphical library. Enabling this option will exclude it. -// If you want to use BSP without LVGL, select BSP version with 'noglib' suffix. -#if !defined(BSP_CONFIG_NO_GRAPHIC_LIB) // Check if the symbol is not coming from compiler definitions (-D...) +/* LVGL integration: default on; disable via menuconfig (CONFIG_BSP_LVGL_INTEGRATION). */ +#if CONFIG_BSP_LVGL_INTEGRATION #define BSP_CONFIG_NO_GRAPHIC_LIB (0) +#else +#define BSP_CONFIG_NO_GRAPHIC_LIB (1) #endif