-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Add ThorVG (lottie) support to LVGL #83519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I started checking those: Usage of alloca should be fine, issue seems to be that they are including the wrong header: So the fix is possibly to include |
|
Trying to fix the thorvg issues at the source: thorvg/thorvg#3107 |
So the fixes were upstreamed to ThorVG, waiting for the update of the library within LVGL. |
This is still an issue with Zephyr 4.1.0. The following functions have caused compilation errors due to missing reference:
This has fixed strdup for me.
Yes, it fixes the issue: #ifdef _WIN32
#include <malloc.h>
#elif defined(__linux__) || defined(__ZEPHYR__)
#include <alloca.h>
#else
#include <stdlib.h>
#endif However, for static int strcasecmp(const char* s1, const char* s2) {
while (*s1 && *s2) {
int diff = tolower((unsigned char)*s1) - tolower((unsigned char)*s2);
if (diff != 0)
return diff;
s1++;
s2++;
}
return tolower((unsigned char)*s1) - tolower((unsigned char)*s2);
} Is there a fix for this? |
Is your feature request related to a problem? Please describe.
PR #68168 updates LVGL to version 9+ which now has built-in support for handling lottie animations through ThorVG. However, to limit the scope of the PR, it does not include the necessary changes to make ThorVG work in Zephyr.
To get the added ThorVG support there are a few minor things that needs to be fixed:
alloca()
use, an alternative is to fix the original#ifdef
or rewrite thesimpleXmlParseW3CAttribute()
to not stack allocate, cause it doesn't look like it needs to.strdup()
in the libcDescribe the solution you'd like
It looks like ThorVG is copied directly from https://github.com/thorvg/thorvg into https://github.com/lvgl/lvgl, so fixing the first issue should be done with a PR to ThorVG first before updating https://github.com/lvgl/lvgl and pulling in the update into Zephyr. Exposing
strdup()
in the libc can be done independently though.Additional context
I've created a proof of context branch in my Zephyr fork. I've also added a sample (
samples/subsys/display/lvgl_lottie
) to showcase the feature. The sample has been tested onnative_sim
andstm32f746g_disco
.The text was updated successfully, but these errors were encountered: