lvgl / lv_demos

Examples, tutorials and applications for the LVGL embedded GUI library
https://lvgl.io
488 stars 366 forks source link

lv_demo_widgets, no display #142

Closed epikao closed 2 years ago

epikao commented 2 years ago

Hello

See my configuration below. All demos works, except lv_demo_widgets. Is there maybe a bug?

Thank you

  //lv_demo_music(); // OK
  lv_demo_widgets(); // NOT OK
  //lv_demo_benchmark(); // OK
  //lv_demo_keypad_encoder(); // OK
  //lv_demo_stress(); // OK
[env:disco_f746ng]
platform = ststm32
board = disco_f746ng
framework = arduino
lib_deps = 
    lvgl/lv_examples@^8.1.1-dev
    lvgl/lvgl@^8.1.0
kisvegabor commented 2 years ago

What if you increase LV_MEM_SIZE?

epikao commented 2 years ago

What if you increase LV_MEM_SIZE?

change # define LV_MEM_SIZE (32U * 1024U) to # define LV_MEM_SIZE (32U * 2048U) does not fix the problem.

Display difference between 1024U and 2048U: 1024U = Garbled screen / random pixel (empty buffer) 2048U = Black screen 3072U = Black screen 4096U = Black screen

kisvegabor commented 2 years ago

Please enable LVGL's logging. https://docs.lvgl.io/master/porting/log.html

It also might be related: https://github.com/lvgl/lv_demos/issues/143

epikao commented 2 years ago

@kisvegabor

Please enable LVGL's logging. https://docs.lvgl.io/master/porting/log.html

It also might be related: #143

with all other demos I receive logging messages, but with lv_demo_widgets(); nothing happens. But I just saw that nothing works at all with widgets, i.e. apparently the program freezes somewhere....

epikao commented 2 years ago

could this problem have a relation to #1599 ? [lvgl/lvgl/pull/1599]

kisvegabor commented 2 years ago

Have you seen something interesting in the log?

could this problem have a relation to #1599

I don't think so. Why do you think it might be related?

epikao commented 2 years ago

I don't think so. Why do you think it might be related?

because if activate lv_demo_widgets everything freezes/crashing...

kisvegabor commented 2 years ago

I've just merged the demos in to the main lvgl repo. I hope it helps to solve issues like these. So, can you try the latest lvgl where everything is in one place?

epikao commented 2 years ago

I've just merged the demos in to the main lvgl repo. I hope it helps to solve issues like these. So, can you try the latest lvgl where everything is in one place?

I replaced the lvgl folder with current version from github, and added following include in main.cpp see below, and removed lv_examples library (via platformIO)

#include <lvgl.h>
#include <demos/lv_demos.h>

but still following compiler error:

main.cpp:(.text.setup+0x148): undefined reference to lv_demo_widgets'

kisvegabor commented 2 years ago

Have you enabled it in lv_conf.h? See https://github.com/lvgl/lvgl/blob/master/lv_conf_template.h#L626

epikao commented 2 years ago

Have you enabled it in lv_conf.h?

YES, but I just remarked that if enabled or not, failure is the same... hmm, clean and so does also not help.

may it is because I've deleted the lv_examples library, see picture below, is this library needed?:

image

kisvegabor commented 2 years ago

Ah, it's just came to my mind what could be the problem. Arduni builds only the files from the src folder. So you acn manually copy the demos folder to src. Probably some include path needs to be modified too.

epikao commented 2 years ago

Ah, it's just came to my mind what could be the problem. Arduni builds only the files from the src folder. So you acn manually copy the demos folder to src. Probably some include path needs to be modified too.

perfect, now it compiles without errors. But I will only be able to test next week whether the widget demo works or not, because I don't have the display hardware at hand right now. Thanks a lot, I'll get back to you.

kisvegabor commented 2 years ago

Glad to hear that! :slightly_smiling_face:

Let's close this issue now. Please open a new one if it doesn't work.