3D_printer example code error?

Example project 3d printer
In Squareline settings, selected target ESP32-S3-LCD-EV-BOARD
Set the to 800x480x16-bit

Export->Create Template Project
Export-> Export UI Files

When the project is compiled in ESP-IDF v5.4, the following error occurs in several files in the 3d_printer\main\ui\images path:

**SquareLine Studio version:1.5
**Operating system: Win10
**Target hardware: ESP32S3

E:/ESPIDF/OtherExamples/Squareline1/3d_printer/main/ui/images/ui_img_3d_printer_bg_png.c:6017:13: error: ‘lv_image_header_t’ has no member named ‘always_zero’

  • 6017 | .header.always_zero = 0,*

E:/ESPIDF/OtherExamples/Squareline1/3d_printer/main/ui/images/ui_img_3d_printer_bg_png.c:6021:18: error: ‘LV_IMG_CF_TRUE_COLOR’ undeclared here (not in a function)

  • 6021 | .header.cf = LV_IMG_CF_TRUE_COLOR,*

When trying the Ebike_Demo, I get the same errors.

I believe I see the issue, the examples are old and only allow LVGL v8.3.11 to be selected
Whereas LVGL is at v9

I installed many of the older versions of squareline:
1.5
1.4.2
1.4.1
1.4.0
1.3.4
All yielded the same errors

Crickets on this forum…hello, anyone, anyone there?

The answer was to tell ESP-IDF to use a specific version of LVGL

In Squareline; File → Project Settings, the LVGL version is selected. Issue the command to ESP-IDF for the same version

idf.py add-dependency “lvgl/lvgl^8.3.11”

This command apparently creates a file, or adds to the file named idf_component.yml, in the “main” directory. Perhaps it does more…unsure

Hi,

The issue is that your ESP-IDF v5.4 is using LVGL 9.1, but SquareLine Studio 1.5 is exporting code compatible with LVGL 8.3.11, which causes the structure mismatch errors you’re seeing.

LVGL 9.1 support for ESP boards is currently only available for ESP-BOX and ESP Wrover Kit boards. To resolve this issue, go to your project settings in SquareLine Studio and select version 2.0.0 of either of these boards (which supports LVGL 9.1), then export your UI files again.

This should generate code that’s compatible with the LVGL 9.1 API used in ESP-IDF v5.4, resolving the errors related to lv_image_header_t structure and LV_IMG_CF_TRUE_COLOR constants which were changed between LVGL 8 and 9.

See the post directly before yours