Generate .c file for assets that are not used on a screen

Hi,
I have some assets, .png’s, that have in SLS but I do not have them on any screen because I have 5 images and only one is displayed. The plan is to change the active picture from the code.
Is there a way to tell SLS to generate files also for those assets?

For the moment I am putting them manually in the ui.h file like:
LV_IMG_DECLARE(ui_img_icn_syshealth_xxx_png);
And the files I generated by placing all of them on the screen and then kept the .c files and deleted the unvanted objects form the screen in SLS.

Thanks,
Gabi

Hi,

I’ve also run into this problem a few times. Now SLS really generates only the images which are being used at least on one screen. What I can imagine as a solution is converting all the images from the asset folder.

What do you think?

That should work well from my point of view. If the user uses a makefile project he can add only the files he want/need to the ones being compiled, if the project is built with something like eclipse that builds all the files in a folder, the unwanted ones can be excluded. Or in the first place, if the assets are really not needed, they can be removed from SLS.

Koszi!
Gabi

Great, I agree! It’s a simple change so we can include it in v1.1 too.

2 Likes