Compilation error for Home Assistant '7.0-inch_Squareline_Demo.ino'
Hello
I try to compile the example 7.0-inch_Squareline_Demo.ino for Home Assistant but it fails there:
"C:\\Users\\user\\AppData\\Local\\Temp\\arduino\\sketches\\AA48A0FC2C07221F422079EFB916D276/7.0-inch_Squareline_Demo.ino.elf"
c:/users/user/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-12.2.0_20230208/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino\sketches\AA48A0FC2C07221F422079EFB916D276\sketch\objs.a(ui.c.o):(.literal.ui_Screen1_screen_init+0x8): undefined reference to `ui_img_small_temp_png'
c:/users/user/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-12.2.0_20230208/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino\sketches\AA48A0FC2C07221F422079EFB916D276\sketch\objs.a(ui.c.o):(.literal.ui_Screen1_screen_init+0x14): undefined reference to `ui_img_small_hum_png'
c:/users/user/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-12.2.0_20230208/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino\sketches\AA48A0FC2C07221F422079EFB916D276\sketch\objs.a(ui.c.o):(.literal.ui_Screen1_screen_init+0x1c): undefined reference to `ui_img_small_logo_png'
c:/users/user/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-12.2.0_20230208/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: C:\Users\user\AppData\Local\Temp\arduino\sketches\AA48A0FC2C07221F422079EFB916D276\sketch\objs.a(ui.c.o):(.literal.ui_Screen1_screen_init+0x24): undefined reference to `ui_img_small_off_png'
collect2.exe: error: ld returned 1 exit status
Using library Wire at version 2.0.0 in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\Wire
Using library SPI at version 2.0.0 in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\SPI
Using library WiFi at version 2.0.0 in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\WiFi
Using library Networking at version 1.0.0 in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\Network
Using library AsyncMqttClient at version 0.9.0 in folder: C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\Arduino_7inch\Arduino_7inch\libraries\libraries\AsyncMqttClient
Using library AsyncTCP at version 1.1.4 in folder: C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\Arduino_7inch\Arduino_7inch\libraries\libraries\AsyncTCP
Using library DHT20 at version 0.3.1 in folder: C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\Arduino_7inch\Arduino_7inch\libraries\libraries\DHT20
Using library lvgl at version 8.3.3 in folder: C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\Arduino_7inch\Arduino_7inch\libraries\libraries\lvgl-3
Using library GFX Library for Arduino at version 1.4.7 in folder: C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\Arduino_7inch\Arduino_7inch\libraries\libraries\GFX_Library_for_Arduino
Using library LovyanGFX at version 1.1.16 in folder: C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\Arduino_7inch\Arduino_7inch\libraries\libraries\LovyanGFX
Using library TAMC_GT911 at version 1.0.2 in folder: C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\Arduino_7inch\Arduino_7inch\libraries\libraries\TAMC_GT911
exit status 1
Compilation error: exit status 1
Images are declared here in inch_Squareline_Demo/ui.h#L47
LV_IMG_DECLARE( ui_img_small_temp_png); // assets\small_temp.png
LV_IMG_DECLARE( ui_img_small_hum_png); // assets\small_hum.png
LV_IMG_DECLARE( ui_img_small_logo_png); // assets\small_logo.png
LV_IMG_DECLARE( ui_img_small_off_png); // assets\small_off.png
These ui_img files are located in the same directory as the ino file:
PS C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\7.0\6、homeassistant\7.0-inch_Squareline_Demo> dir
Répertoire : C:\Users\user\Documents\Dev\Elecrow_CrowPanel_7.0\7.0\6、homeassistant\7.0-inch_Squareline_Demo
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 04/06/2024 23:15 README
-a---- 05/06/2024 09:19 12407 7.0-inch_Squareline_Demo.ino
-a---- 04/06/2024 23:15 411 debug.cfg
-a---- 05/06/2024 09:19 342 debug_custom.json
-a---- 04/06/2024 23:15 2715638 esp32s3.svd
-a---- 05/06/2024 09:19 1623 README.md
-a---- 05/06/2024 09:19 5656 touch.h
-a---- 05/06/2024 09:19 7584 ui.c
-a---- 05/06/2024 09:19 1460 ui.h
-a---- 05/06/2024 09:19 297 ui_events.h
-a---- 05/06/2024 09:19 7058 ui_helpers.c
-a---- 05/06/2024 09:19 3547 ui_helpers.h
-a---- 05/06/2024 09:19 784679 ui_img_elecrow_logo_png.c
-a---- 05/06/2024 09:19 226769 ui_img_humidity_png.c
-a---- 05/06/2024 09:19 226744 ui_img_off_png.c
-a---- 05/06/2024 09:19 226749 ui_img_temp_png.c
Should I move these files to another directory? Could you help me to fix this issue?
Regards
Comments
The image file names declared in the ui.h file do not match with the files found in the example directory: 7.0-inch_Squareline_Demo.
File list
The example provided by Elecrow is not correct.
Can you fix this @Elecrow?
Please follow the new tutorial and refer to the sample code(the link is in the description of videos)
https://forum.elecrow.com/discussion/731/new-tutorial-videos-for-esp32-hmi-is-updated/p1?new=1
@Elecrow Why don't you simply correct your example files?