Components Include with current Get Started

AlexESP32
Posts: 65
Joined: Thu Oct 03, 2019 9:41 am

Components Include with current Get Started

Postby AlexESP32 » Mon Dec 02, 2019 6:12 pm

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 :)

AlexESP32
Posts: 65
Joined: Thu Oct 03, 2019 9:41 am

Re: Components Include with current Get Started

Postby AlexESP32 » Tue Dec 03, 2019 5:09 am

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😉

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Components Include with current Get Started

Postby chegewara » Tue Dec 03, 2019 5:48 am

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

AlexESP32
Posts: 65
Joined: Thu Oct 03, 2019 9:41 am

Re: Components Include with current Get Started

Postby AlexESP32 » Tue Dec 03, 2019 6:04 am

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😉

AlexESP32
Posts: 65
Joined: Thu Oct 03, 2019 9:41 am

Re: Components Include with current Get Started

Postby AlexESP32 » Tue Dec 03, 2019 6:08 am

Also I will try the tool, maybe this will work😉
Thank you.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Components Include with current Get Started

Postby chegewara » Tue Dec 03, 2019 6:39 am

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.

AlexESP32
Posts: 65
Joined: Thu Oct 03, 2019 9:41 am

Re: Components Include with current Get Started

Postby AlexESP32 » Tue Dec 03, 2019 12:10 pm

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.

AlexESP32
Posts: 65
Joined: Thu Oct 03, 2019 9:41 am

Re: Components Include with current Get Started

Postby AlexESP32 » Tue Dec 03, 2019 8:57 pm

Nobody who can help me? :(

If more information are required i can give them..

Who is online

Users browsing this forum: dzungpv, Google [Bot], jimmy98035@gmail.com and 100 guests