I am practically a newbie in the esp32 world and i am starting with esp-idf.
I am trying to learn make, cmake and esp-idf projects structure at least 2 weeks and i couldn’t make the “complex structure” project compile on esp-idf yet.
The hello_world and sdio/host example provided by espressif compile just fine, and i was even able to integrate esp-idf into visual studio code.
Until jtag, openocd, gdb i managed to make it work inside the visual studio code and in my hardware.
All “process” below are working fine:
At the beginning off all these learning curve, i was mixing document version(esp-idf, tools, etc), because i download the stable version v3.2.2 and i was searching by googling, which led me to different espressif documentation pages in each new search(latest idf version for example).
So i was mixing component.mk with CMakeLists.txt.
After the penny has dropped(i understant), i uninstalled all the old files of version v3.2.2 and all other tools and started a new installation from scratch with the latest version: v4.1-dev-141-ga7e8d87d3.
I am only using now the latest documentation on espressif site link: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html, and trying to follow the project structure, but the documentation is complicated to me, because dont have examples.
I dont know what write inside the CMakeLists.txt(beyond the minimum) or in component.mk if i need yet this file.
The link site show “commands” but dont show command sintax with examples and where applicable, etc.
The hello_world example has a CMakeLists.txt in the main directory, but in the link above don’t exists this file in project structure.
I am very confused.
I download a component (littlevGL) and i am trying to adapter this component inside the espressif suggested structure.
The littlevGL component has a “little long” subdirectory structure that makes sense to me.
How to tell the compiler the path or files to add to the compiling ?
There is a simple command like: add all subdirectory from “x” path ?
I need component.mk files yet or only CMakeLists.txt or i need both files in the project(dir and/or subdir) ?
Where to put this files and what write on them ?
Attached follows my entire project without the build directory.
(i try to attach, but “new users” cannot attach files).
PS: i asked the same question on the espressif forum.