I started doing the tests step by step.
I took the example “hello_world” and went removing files one by one and checking if it compiled, until the minimum necessary to compile only using CMake.
After this step, i added the components folder to “hello_world” project and follow the tips of this discussion and the espressif discussion.
After a lot of “trial and error” i made the project compile.
The next step is to change lib littlevgl (i want to make it as clean as possible) to compile using cmake only.
I will try to change all includes, in all files, and try to make the path as short as possible.
In annex follow the two projects with the minimum requirements to compile on cmake.
After i compile the project with the littlevgl component, if anyone wants to upload it to littevgl git, they feel free to.
I will post the code here, when i finish.
I am try to create a folder inside components folder ie:
projectFolder/components/ui/.global_conf
Yes “projectFolder/components/ui” are working, only check on this project i posted above. hello_world-withComponents.zip
In folder “.global_conf” i put all *.h files that i consider LittleVgl config and other things like:
“.global_conf” folder
lv_conf.h
lv_conf_checker.h
lv_conf_template.h
lv_ex_conf.h
lv_ex_conf_templ.h
lv_examples.h
lv_test.h
lv_version.h
lvgl.h
My problem are how to register these folder(that only has *.h files) on Cmake espressif structuring.
I already trying to add this folder like a component folder(so i could use requires on the others components that needed the files in this folder) but not works.
I tried other things too, but no luck.
I’m following a part of the techtoys project structure.
In annex follow the project with the minimum Cmake requirements i think.
You need to check the project flags in component.mk files that no longer exist more.
I added a folder in project root named “.Project-Files” as a suggestion to put “.git” folder, assembly images, readme and so on.
I changed all include in all files, too.
Now the includes are all “simple” like #include “lvgl.h”
I have a doubt:
I need to register the .bin files ?
I need to register the .jpg and .png files ? I dont know if some of these files are invoked from some .c files.
Example:
idf_component_register( SRCS
“blue_flower_8.bin”
“blue_flower_16.bin”
)
I flash the code on hardware, first without touch, ie, only display. Everything is OK. The page scrolls between write, list and chart.
After i added the touch screen. The page still scrolls, and the touch respond in a bad way.
What can it be ?
Any suggestions?
Do I need to configure anything ?
Is that because of the “component.mk” files i delete, because they had some configuration flags.
My project estructuring is “very different” from the original.
I see. This way it’s more difficult to see that changes and I need some time to update the project. Can send the GitHub link of your project? Seeing the commit would be useful.
Now it’s working but i still think i need to calibrate the touch, because it’s clicking a little out of place and the touch is a little sensitive.
Baldhead, thanks for sharing the files, you did tons of work changing them. I am having the same CMAKE issue transiting to LVGL 6.0 with esp.idf v4.1 and I came up with the same conclusion but when I saw how many lines I need to change I just gave up.
Just to clarify something previously discussed.
Projects made using latest esp-idf (v.4.x) can be compiled with CMake and Make files depending on the tools you use. Previous versions did not have CMake and future versions will not have Make, we are in the middle of transition period now