Page 1 of 1

Components Include with current Get Started

Posted: Mon Dec 02, 2019 6:12 pm
by AlexESP32
Hello.

Maybe someone can help me with this "small" issue...

1. I programed the ESP32 with msys32 and the Get Started Legacy (https://docs.espressif.com/projects/esp ... ed-legacy/).

To include my components I added the CMakeLists.txt with this code and this works:
idf_component_register(SRCS "src/abc.c"
INCLUDE_DIRS include)

2. Now i want to program the ESP32 with the current Get Started (https://docs.espressif.com/projects/esp ... index.html).
In this case I cant include the components with idf_component_register, the error is: No such file or directory
Wich file i have to add so this works?

Thank you :)

Re: Components Include with current Get Started

Posted: Tue Dec 03, 2019 5:09 am
by AlexESP32
Hello

Would be nice if someone could help me with this small issue.
Wich file I have to add? Component.mk and cmakelists.txt and Wich code would be in this files? I tried it and I didn't get the right result.. Only No such file or directory..
But it I add the file inside the main folder I got the right result without error.. 😉

Thank you😉

Re: Components Include with current Get Started

Posted: Tue Dec 03, 2019 5:48 am
by chegewara
Maybe this will help you, here is comprehensive info about esp32 project with CMake:
https://docs.espressif.com/projects/esp ... ystem.html

You can also try this:
https://docs.espressif.com/projects/esp ... rsion-tool

Re: Components Include with current Get Started

Posted: Tue Dec 03, 2019 6:04 am
by AlexESP32
Thank you.
Unfortunately I already tried this and I didn't get any success.. I don't understand the manual unfortunately and maybe missed some important information..
Maybee you can say to me wheater it is right that I need the cmakelists.txt & component.mk?
And what is the code inside of them to include a simple component..
Is this code the similar code as this from the legacy get started?
The best would be a simple example project😀..

Thank you😉

Re: Components Include with current Get Started

Posted: Tue Dec 03, 2019 6:08 am
by AlexESP32
Also I will try the tool, maybe this will work😉
Thank you.

Re: Components Include with current Get Started

Posted: Tue Dec 03, 2019 6:39 am
by chegewara
AlexESP32 wrote: The best would be a simple example project
Here is "few":
https://github.com/espressif/esp-idf/tr ... r/examples

Each example is prepared to work with both, cmake and gnu make.

AlexESP32 wrote:Maybee you can say to me wheater it is right that I need the cmakelists.txt & component.mk?
CMakeLists.txt is required only by CMake build and components.mk is required only by GNU make.

If you would show your project folders structure it would be easier to help you.

Re: Components Include with current Get Started

Posted: Tue Dec 03, 2019 12:10 pm
by AlexESP32
The project structure is like this:

Example Project:

custom_config
- components
- - custom_provisioning
- - - include
- - - - proto
- - - proto-c
- - - python
- - - src
- - - - custom_config.c
- - - CMakeLists.txt
- - - component.mk
- main
- - app_main.c
- - app_prov_handlers.c
- - app_prov.c
- - app_prov.h
- - CMakeLists.txt
- - component.mk
- CMakeLists.txt
- Makefile

--> this works, also with the components..

But if i include another component:
- components
- - custom_provisioning
- - - include
- - - - proto
- - - proto-c
- - - python
- - - src
- - - - custom_config.c
- - - CMakeLists.txt
- - - component.mk
- - task
- - - src
- - - - task.c
- - - include
- - - - task.h
- - - CMakeLists.txt
- - - component.mk
...

This doesnt work...
--> No such file or directory

Thank you very much.

Re: Components Include with current Get Started

Posted: Tue Dec 03, 2019 8:57 pm
by AlexESP32
Nobody who can help me? :(

If more information are required i can give them..