LiliyGO T-RGB - SLS created screen do not show

I am a newbie to C++ (PlatformIO) and Squareline Studio, last programming attempts ~ 25 yrs ago with C and Visual Studio, and need some help before desperately jumping out of the window.

What do you want to achieve?

I want to use Squareline Studio with a LilyGO T-RGB 2.1 round display.

What have you tried so far?

I have installed the TRGBArduinoSupport lib from Ian Hubberts, I have managed to get the sample provided with the lib running fine, But when I compile my project with one screen created in SLS only the Lib’s startup logo is showing on the screen, but not my screen. Project compiles w/o errors, and I have compared PlatformIO.ini as well as the main header and code files (ui.c) for siginificant differences, but did not find any. FMPOV anything OK. Any hints where I should look further?

Project preferences in SLS set to ESP–S3-LCD-EV-Board V. 1.01, because this setting only allows to set 480 x480 screen width with round shape.

Screenshot or video

Others

  • SquareLine Studio version:
    1.3.0
  • Operating system:
    Windows 11
  • Target hardware:
    LilyGO T-RGB

It seems you have successfully created your display driver but probably you forgot to set up a the tick interface. See Tick interface — LVGL documentation

You can also set up a custom tick function here.

Hello Gabor,

many thanks for your reply and your advice, indeed I did not initiate the tick interface, the loop() function is still unemployed, as I first wanted to set up the GUI before proceeding with the functional coding. Is it sufficient to set up the function in lv_conf.h like this:

#define LV_TICK_CUSTOM 100
#if LV_TICK_CUSTOM
//#define LV_TICK_CUSTOM_INCLUDE “Arduino.h” /Header for the system time function/
//#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /Expression evaluating to current system time in ms/
/If using lvgl as ESP32 component/
#define LV_TICK_CUSTOM_INCLUDE “esp_timer.h”
#define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
#endif /LV_TICK_CUSTOM/

Many thanks,
Thomas

Hello Gabor,

I just checked the project and the custom tick interface was already enabled with Arduino flavor in lv_conf.h.:

#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE “Arduino.h” /Header for the system time function/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /Expression evaluating to current system time in ms/
/If using lvgl as ESP32 component/
//#define LV_TICK_CUSTOM_INCLUDE “esp_timer.h”
//#define LV_TICK_CUSTOM_SYS_TIME_EXPR ((esp_timer_get_time() / 1000LL))
#endif /LV_TICK_CUSTOM/

So this wasn’t the reason.

BR,
Thomas

To check if the tick is a reason, I have disabled the LV_TICK_CUSTOm in lv_conf.h, and added a small routine in loop():

static uint32_t Millis = 0;
static uint16_t time_counter = 0;

lv_timer_handler();
if (millis() - Millis > 1000) {
	time_counter++;
	Millis=millis();
time_t now;
  time(&now);

}
else {
delay(2);
}

But now the T-RGB crashed and is rebooting constantly.

ELF file SHA256: 392379f7c0781e95

Rebooting…
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x4204bb8e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a38
entry 0x403c98d4
Init T-RGB device. Bootcount:1
Found xl9535
Register setup complete
Register display driver to LVGL
Guru Meditation Error: Core 1 panic’ed (InstructionFetchError). Exception was unhandled.

Core 1 register dump:
PC : 0x3fcebe40 PS : 0x00060a30 A0 : 0x82016523 A1 : 0x3fcebdc0
A2 : 0x3fcebe40 A3 : 0x3fc974a8 A4 : 0x3d9522b8 A5 : 0x00000000
A6 : 0x00000130 A7 : 0x00000000 A8 : 0x8200b15e A9 : 0x3fcebda0
A10 : 0x3fcebdd0 A11 : 0x00000000 A12 : 0x00000002 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000020 EXCCAUSE: 0x00000002
EXCVADDR: 0x3fcebe40 LBEG : 0x4200b146 LEND : 0x4200b151 LCOUNT : 0x00000000

Backtrace: 0x3fcebe3d:0x3fcebdc0 |<-CORRUPTED

1 Like

Hi,

Sorry for the late reply. If the Arduino tick was enabled than it should be fine.

I recommend trying to make the screen work without LVGL and SLS first. There might some issues with wiring, drivers, or ohter hardware related things.

If you can paint the screen to red it should work with LVGL too.

MAny thanks for your reply, but this issue is obsolete, the screen is already working fine. Only some minor issue with potential bugs or misread or missing doc issue are left.