Following this discussion DISCO-F746NG display Bug and starting from this program: DISCO-F746NG_MbedOs_LvGL_example - Example of using the LVGL (8) with the MbedOS (6.… | Mbed I want to successively display the examples included in the LVGL library on the touch screen of a DISCO-F746NG.
Naively, I thought I could achieve this by clearing the screen after each example , but I can’t find an instruction that would do that in this library . In addition, I now think that it would certainly be necessary to destroy all the objects created in the previous example, I do not know if there can be an instruction which would allow this to be done on all the objects at the same time ? Maybe it is necessary to destroy the objects one by one ?
Do you have any idea about the instructions?
Screens can be deleted with lv_obj_del(scr), but ensure that you do not delete the currently loaded screen.
It is also helpful to start with the examples from the documents (for each widget) in the micropython simulator. It is not the same syntax as C, but is easier and faster to check out the properties and functions.
I can help you also with setting up Mbed-CE and get my project running. It is not perfect, but the good thing with Mbed-CE is that you can simply add sub-projects for testing several features. Compiling is fast because Mbed is compiled once as a library.
You can send me a PN if you like.
Thanks for this hint, I used lv_obj_clean(lv_scr_act()) it works.
However, if I try to scroll through all the examples, I get errors like this:
[Error] @0,0: L6406E: No space in execution regions with .ANY selector matching BUILD/DISCO_F746NG/ARMC6/lvgl/ src/misc/lv_anim.o(.bss.last_timer_run).
At compile time, the program is not even loaded on the target. I feel like the compiler is telling me that the program would overrun the target’s memory.
For this to work, I have to comment out a lot of the example function calls. I managed to scroll through a maximum of 18 examples, sometimes less.
I saw the examples on Examples — LVGL documentation but their names don’t exactly match those in the library.
Thank you for your help proposal for Mbed CE, I don’t know yet when I will test it, I hope soon.
I haven’t tried to use a compilation of all examples. How can you switch between the examples?
The size maybe huge when there are images and fonts included. Some need also a lot of RAM, e.g. Canvas or shadow style. But this will create a runtime error or hardfault when there is not enough RAM.
The development of lvgl is also very dynamic, so the documentation is not always up-to-date. Its really incredible what is already included.
First of all you need to select stable LVGL release (not master/develop branch), and corresponding version of documentation and examples.
However, I do not understand for what this is good for. I can imagine you will try multiple screens with some objects, but all examples in one program…
From my point of view the Demo widgets example is the most important example in general and show multiple solo examples in one final solution.