Skip to content

Commit 04b987a

Browse files
feat(wrover_kit): Add noglib menuconfig option
1 parent 0b722d3 commit 04b987a

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

bsp/esp_wrover_kit/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ menu "Board Support Package"
3333
endmenu
3434

3535
menu "uSD card - Virtual File System"
36-
config BSP_uSD_FORMAT_ON_MOUNT_FAIL
36+
config BSP_SD_FORMAT_ON_MOUNT_FAIL
3737
bool "Format uSD card if mounting fails"
3838
default n
3939
help
@@ -47,6 +47,14 @@ menu "Board Support Package"
4747

4848
endmenu
4949
menu "Display"
50+
config BSP_LVGL_INTEGRATION
51+
bool "Build BSP with LVGL integration"
52+
default y
53+
help
54+
When enabled, BSP headers and sources include LVGL and esp_lvgl_port.
55+
A compiler definition BSP_CONFIG_NO_GRAPHIC_LIB can override this setting.
56+
Note: Run idf.py update-dependencies after changing this setting.
57+
5058
config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
5159
int "LEDC channel index"
5260
default 1

bsp/esp_wrover_kit/idf_component.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ dependencies:
1515
version: "^2"
1616
public: true
1717
override_path: "../../components/esp_lvgl_port"
18+
rules:
19+
- if: "$CONFIG{BSP_LVGL_INTEGRATION} == True"
1820

1921
button:
2022
version: "^4"
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
#pragma once
88

9+
#include "sdkconfig.h"
10+
911
/**************************************************************************************************
1012
* BSP configuration
1113
**************************************************************************************************/
12-
// By default, this BSP is shipped with LVGL graphical library. Enabling this option will exclude it.
13-
// If you want to use BSP without LVGL, select BSP version with 'noglib' suffix.
14-
#if !defined(BSP_CONFIG_NO_GRAPHIC_LIB) // Check if the symbol is not coming from compiler definitions (-D...)
14+
/* LVGL integration: default on; disable via menuconfig (CONFIG_BSP_LVGL_INTEGRATION).
15+
Compiler definition -D BSP_CONFIG_NO_GRAPHIC_LIB=0|1 overrides menuconfig. */
16+
#if !defined(BSP_CONFIG_NO_GRAPHIC_LIB)
17+
#if CONFIG_BSP_LVGL_INTEGRATION
1518
#define BSP_CONFIG_NO_GRAPHIC_LIB (0)
19+
#else
20+
#define BSP_CONFIG_NO_GRAPHIC_LIB (1)
21+
#endif
1622
#endif

0 commit comments

Comments
 (0)