Why 1.4.2 gen a "ui_temporary_image.c" file in ui/images?

What do you want to achieve?

the file “ui_temporary_image.c”:
// LVGL Temporary Image.

#include “…/ui.h”

#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

// IMAGE DATA: TemporaryImage
const LV_ATTRIBUTE_MEM_ALIGN uint8_t ui__temporary_image_data = {

I see this file used for none-sourced img widget…I think this is no need, just keep the img empty and I would set it from programs,
and this file is not small add extra bin size…
if this is nice to have, small it size may be nice

and even! the “CMakeLists.txt” in ui dir add this file with wrong path:

SET(SOURCES …
ui_temporary_image.c
…)

this is wrong path! I need change it every time export ui

What have you tried so far?

Screenshot or video

Others

  • SquareLine Studio version:
  • Operating system:
  • Target hardware:

Squareline 1.4.2 generates ui/images/ui_temporary_image.c, but ui/CMakeLists.txt contains ui_temporary_image.c, so

CMake Error at …/ui/CMakeLists.txt:183 (add_library):
Cannot find source file:

ui_temporary_image.c

Does anyone know how to solve this?

modify the " ui_temporary_image.c" line to this:
" images/ui_temporary_image.c"

Surely it works like this, but I’m interested in fixing it through Squareline. Is there any option?

1 Like

Would some one be able to explain why I am getting this error all of a sudden in SL 1.4.2

C:\Work\ArduinoV2\Sketches\MakerFabs\ESP32.S3.3.5\LVGL\LVGL_LovyanGFX_GolfCart\src\ui\ui_temporary_image.c:3:10: fatal error: …/ui.h: No such file or directory
#include “…/ui.h”
^~~~~~~~~
compilation terminated.
exit status 1

Compilation error: …/ui.h: No such file or directory

After every export from SquareLine studio 1.4.2, I need to modify the line

#include "../ui.h"

in ui/images/ui_temporary_image.c to

#include "ui.h"

This is easy to do, but probably also easy to fix in Squareline Studio.

HenkJan

The relative path in “…/ui.h” should be fine as the header-file ui.h is really at a one-level lower subdirectory. Maybe it’s your build-system that would like to handle the paths differently (relative to the project). It would be good to know, to determine the cause, which board-template / IDE you have the problem with.

It may have to do with my project settings. I have defined the following paths:

Project export root: [path to project directory]\src
UI files export path: [path to project directory]\src\ui

My main.c file is located in:
[path to project directory]\src\main.c

I’m calling #include "ui\ui.h" from main.c

Both ui.h and ui_temporary_image.c are located in [path to project directory]\src\ui

Other image files, such as ui_img_temp_btn_cooler_png.c, are referring to #include "ui.h", ui_temporary_image.c is the only exception.

What I forgot to mention in my original post, is that I am using Version 2.0.0 and LVGL 9.1.0. This may also be related.

Hope this helps,

HenkJan van der Pol.