Updating SenseCap Indicator ESP-IDF Template to LVGL 9 and ESP-IDF 6

Hi everyone,

We are currently working with the Seeed SenseCap Indicator and started with the Indicator ESP-IDF template.
This template is based on LVGL 8 and an older version of ESP-IDF.
We tried updating to LVGL 9 and ESP-IDF v6.0.
However, we are running into a couple of major issues:

  • LVGL 9 Crashes: We’ve attempted to manually create our custom LVGL port from version 8 to 9. While it compiles, we’re experiencing random system crashes.
  • ESP-IDF v6.0 Build Errors: The project no longer builds because several includes are now deprecated (e.g. driver/i2c.h and driver/adc.h).

My main question is: Is there any plan from Seeed to update the Indicator ESP-IDF template to support LVGL 9 and ESP-IDF v6.0? Or is the template no longer being actively maintained?
We are trying to figure out if we should continue down this path or look for alternative solutions.
Any insights from the community or Seeed staff would be greatly appreciated.

Thanks!

Hi There,

So LVGL is hard on ram with my experiences, Version 9 even more so… I don’t use ESP-IDF, the LLM shows it also.

Hard-Capped LV_MEM_SIZE: If they just copied over their old lv_conf.h from the v8 template, they likely have a fixed LV_MEM_SIZE (like 32KB or 64KB) that worked perfectly before but is now being instantly exhausted by v9’s larger footprint. When LVGL 9 runs dry, it often fails to allocate draw buffers and triggers assertion errors or hard crashes, rather than failing gracefully.

You need PSRAM in your project if the config from 6.0 is not using it for heap it will crash. :crossed_fingers:

Try to set LV_LOG_LEVEL to LV_LOG_LEVEL_INFO. By default, LVGL 9 hides some memory allocation warnings that could pinpoint exactly where the crash is originating! :+1:

HTH
GL :slight_smile: PJ :v:

Thanks so much for the detailed response!

I set the LV_MEM_SIZE to 128kB, and the random crashes during runtime have indeed stopped - so that was definitely part of the problem.

However, following your other tip, I enabled LV_LOG_LEVEL_INFO to dig deeper, and now the system fails instantly on startup. This strongly points to race conditions or leftover interrupt/callback hooks from LVGL 8 that are conflicting with the LVGL 9 initialization. It seems the template has some deeply embedded LVGL calls hidden in the components.
Is there an easy way to completely strip out all LVGL calls from the template while keeping the underlying hardware peripherals intact?

Thanks again, PJ!

1 Like

Hi there,

Awesome, and Yes there is. So I guess 2 options according to Jim :grin:
The Long and Short of it, Try a newer BSP the current one must have some hardcoded hooks in it for LVGL 8.

I asked about the difference:

" The LVGL 8 vs. 9 Driver Conflict

In the Seeed SenseCAP Indicator template, the display and touch peripheral initializations are usually tightly coupled with LVGL inside the project’s components folder (often something like indicator_display.c or similar).

  • The Structural Shift: LVGL 9 completely deprecated the old lv_disp_drv_t (display driver) and lv_indev_drv_t (input device) structures used in version 8, replacing them with a simplified lv_display_t and lv_indev_t API.
  • The Crash Trigger: The Seeed template likely has FreeRTOS background tasks or interrupts still trying to fire standard LVGL 8 flush callbacks or poll the touch screen using the old structures. When it tries to push that data into the newly initialized LVGL 9 core, it immediately dereferences a null pointer or hits a race condition and panics on startup.

How to Strip LVGL out of the Template

To answer their question directly: Yes, they can strip it out, but it requires a bit of surgical commenting rather than just deleting folders.

They need to decouple the native ESP-IDF hardware drivers from the GUI layer:

  1. Keep the esp_lcd Initialization: The template uses ESP-IDF’s native esp_lcd driver to turn on the RGB panel, initialize the ST7701S (or similar) display IC, and allocate the frame buffers. They must keep this code so the screen actually powers on.
  2. Keep the I2C Touch Initialization: They need to keep the code that initializes the I2C bus and the touch controller IC.
  3. Sever the LVGL Bindings: They need to find the specific functions that bind these hardware peripherals to LVGL (usually functions containing lv_disp_drv_register or lv_indev_drv_register) and comment them out entirely, along with the LVGL flush_cb and read_cb callbacks.

Once they sever those bindings, the ESP32 will initialize the hardware frame buffers natively without forcing LVGL to handle them, stopping the startup crash.
"
I know on the Arduino side & LVGL 9 the Newest BSP works and the older ones do in some situations, but generally I find LVGL 8 works ok for most cases with pretty much all of them. :+1:

HTH
GL :slight_smile: PJ :v:

So , I went back around and asked for any built-ins you could try. I was surprised :crossed_fingers:

The absolute easiest way for them to test their new LVGL 9 stack without downloading a completely new repository is to use the built-in LVGL Demos.

Because LVGL packages its own official demo apps right into the library, they can use this to immediately verify if their display buffers and touch controllers are correctly bonded to the new v9 API, completely separate from the old SenseCAP UI code.

Here is what you can tell b.ibo to do to fire up the classic Widgets demo:

How to run the built-in LVGL 9 Demo:

1. Enable the Demo in Config Open the project’s lv_conf.h file, scroll down to the Demos section, and enable the widgets demo by changing the 0 to a 1:

#define LV_USE_DEMO_WIDGETS 1

(They can also enable LV_USE_DEMO_BENCHMARK 1 if they want to stress-test their PSRAM configuration later).

2. Include the Demo Header At the top of their main file (wherever they are calling lv_init()), add the include path for the demos:

#include "demos/lv_demos.h"

3. Call the Demo Function After lv_init() is called and the esp_lcd hardware / touch drivers are fully initialized and registered to LVGL, simply call the demo function before entering the main FreeRTOS lv_timer_handler() loop:

lv_demo_widgets();

If the screen boots up and they can interact with the buttons and sliders, they know their ESP-IDF v6 and LVGL 9 foundation is rock solid. From there, they can start porting the actual SenseCAP indicator UI code over to the new v9 formatting!

I didn’t know, but now WE do :grin: :v: