lvgl / lv_web_emscripten

LVGL ported to Emscripten to be converted to JavaScript
MIT License
80 stars 28 forks source link

Which code should I recompose if I want to make changes in build/index.js #9

Closed sk123sos closed 3 years ago

sk123sos commented 3 years ago

I want to add a timestamp into the created build/index.js,can I recompose some code to add time stamp into it?

embeddedt commented 3 years ago

This is somewhat off-topic since it doesn't pertain to anything LVGL-specific, but I would piggyback on this line of the Makefile and prepend something like window.buildTimestamp = \"$(shell date)\"; to the echo string.

sk123sos commented 3 years ago

This is somewhat off-topic since it doesn't pertain to anything LVGL-specific, but I would piggyback on this line of the Makefile and prepend something like window.buildTimestamp = \"$(shell date)\"; to the echo string.

thanks for help,I have a new qusetion now,If I change the limited size to 1920*1080,I will get lots of mem error,what should I do to avoid this?

embeddedt commented 3 years ago

Are you referring to the screen resolution? You would need to increase the maximum allowed size in lv_conf.h.

sk123sos commented 3 years ago

Are you referring to the screen resolution? You would need to increase the maximum allowed size in lv_conf.h.

yes I did ,but it shows that LINK build/index.html wasm-ld: error: initial memory too small, 22014176 bytes needed emcc: error: failed (1) Makefile:52: recipe for target 'build/index.html' failed

embeddedt commented 3 years ago

What values did you increase it to? It's asking for 20GB of RAM! :confused:

sk123sos commented 3 years ago

What values did you increase it to? It's asking for 20GB of RAM! 😕

I only change the lv_conf.h with

define LV_HOR_RES_MAX 1920

define LV_VER_RES_MAX 1080

embeddedt commented 3 years ago

I did the calculation wrong; it's actually only asking for 20MB, which is much more reasonable. Try adding -s INITIAL_MEMORY=67108864 beside the other -s argument on lines 49 and 53.

sk123sos commented 3 years ago

I did the calculation wrong; it's actually only asking for 20MB, which is much more reasonable. Try adding -s INITIAL_MEMORY=67108864 beside the other -s argument on lines 49 and 53.

Thanks for help,I will try it later

stale[bot] commented 3 years ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.