Generic usage of assets to support storage in filesystem

What do you want to achieve?

I want to store assets (images, fonts) in a filesystem on a seprate flash on the target. LVGL supports this approach with its filesystem abstraction module (File system — LVGL documentation) in combination with loading ressources by path specification instead of ressource-pointers (Image (lv_img) — LVGL documentation)

Do you see alternative options and workaround to achieve it?

It looks like SquareLine Studio currently doesn not support this functionality yet, as the generate code always references the code-generated assets. I currently need to manually modify the generated code to load the ressource from FS.
It would be one soluation if SquareLine allows two separate definitions of the assets. One for direct usage of the asset and its generated ressource and a second defintion for a reference to a filesystem. The user can adjust code-generate by an according checkbox in the export settings.

Optionally, the export could also generate some information on the asset mapping, which might be useful for userspecific generation of filesystem images.

Mention some use cases

I assume it is a very common use case for a lot of especailly small embedded devices to put the assets onto a separate flash (e.g. SPI-Flash). LVGL generally supports this approach, so should SquareLine Studio do as well.

1 Like

It was requested multipele times in the near past, so we added this to our roadmap.

1 Like

Is there an update when this feature will be available?

1 Like

We plan to implement this feature in the next SLS-1.3.5 version (planned for january).

1 Like

Thank you.
If I could add an extra feature on the wishlist: it would be great when also the online image converter functionality would be added so that the according assets/files are exported automatically.

Perfect. It’s a feature I really need

Loading images from assets on SD-card/flash is already implemented, if that is what you mean. Its usage is documented as well. The images are converted (when needed) and automatically exported to a ‘drive’ folder in the exported project. If you want to put them on a partition in an embedded device you should copy the files to the partition by different means of course.