'res_color' undeclared

Hey guys - First time working with SquareLine and have been beating mu head up against a well about this one for a week. I am trying to simply load a black screen with “TEST” so I can get the upload to a WC32-SC01 or SC01 Plus (I have both) using arduino IDE. Each time I compile I get the following error and exit status 1. Nothing I seem to change helps with this

{
D:\Desktop\SQLN ARDU\SquareLine_Project\libraries\lvgl\src\draw\sw\lv_draw_sw_blend.c: In function ‘set_px_argb_blend’:

D:\Desktop\SQLN ARDU\SquareLine_Project\libraries\lvgl\src\draw\sw\lv_draw_sw_blend.c:433:14: error: ‘res_color’ undeclared (first use in this function); did you mean ‘bg_color’?
buf[0] = res_color.full;
^~~~~~~~~
bg_color

D:\Desktop\SQLN ARDU\SquareLine_Project\libraries\lvgl\src\draw\sw\lv_draw_sw_blend.c:433:14: note: each undeclared identifier is reported only once for each function it appears in
}

Also seeing to get “DMA unsupported” but I think thats just a warning.

Specs:

  • Win 10
  • Arduino 1.8 / 2.3 both tested
  • SC01
  • User_Setup_Select.h has been modified by uncommenting the SC01 setup file
  • sketchbook is pointed at the project folder containing readme
  • programming ESP32 achieved in minimalist sketches without UI so I know that isnt the issue.

Guessing I may just have an ID10T error somewhere or am missing a small but critical element but I have run out of ideas to debug and only have a few days left of my trial and really need to get it working so I can justify getting a subscription.

Checking lv_draw_sw_blend.c line 433 reveals that there’s indeed a res_color object referenced there in that set_px_argb_blend function, but only if LV_COLOR_DEPTH is set to 8 in lv_conf.h. But that ‘res_color’ is interestingly not defined in that function, nor globally with LVGL-8.3.6, so maybe this is a typo or a missing/untested feature/code, but who am I to tell. Anyway, LVGL-8.3.11 has last_res_color there which is actually defined earlier, so selecting 8.3.11 in the LVGL dropdown might solve your issue. (It seems in your project settings you need to set the display to 8 bits, which is strange, but this situation implies that you might have more luck/compatibility with a 16bit display-mode and setting.)

Thanks for the tip! I was using an older vewsion of squareline which only went ot 8.3.6 - Updating to squareline v 1.4.0 gave me LVGL 8.3.11. The compilation error was gone and the code compiled correctly. Now I simply have lines across a screen which is … progress…

I would have assumed that this would have worked a bit more out-of-the-box but it appears not. It seems to be difficult to debug when working in a software that creates a higher level of abstraction without being extremely familiar with the core libraries, or at least a lot of familiarity with debugging at a very high level. Maybe more tested board specific code would help with this

Good to hear the newer LVGL version solved the compilation problem.
The currently available Arduino-TFT_eSPI board-template is not board-specific at all. It’s just a general Arduino-IDE base with TFT_eSPI which you need to configure to your board. It’s even possible that TFT_eSPI doesn’t have the display drivers for your hardware, in that case you need to provide the display/touch/etc. drivers, like using Arduino-IDE’s library-manager or ESP-IDF’s board-support, etc.

SInce the original issue has been resolved, I will respond in the new thread

For anyone who wishes to follow: WT32-SC01 - Compiled but only displaying lines across screen - Possible issue with TFT_eSPI