-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Linking multiple components in custom repo. #3300
Comments
@Raghav3107 You need to manually link the IDF components that are used externally. This can be done by passing Please find working example at https://github.com/shubhamkulkarni97/amazon-freertos-examples/tree/feature/idf_v4.2 |
Hello @shubhamkulkarni97 I saw your repository of the above link. I tried to use that. I replaced your freertos v202012 with 202106. But the issue is the same. Q: How we will find the components name? So can you explain, from where can get the components name? Thanks in advance for your reply and clarification. I manage to link the esp-idf components files. But It will be better if you explain to us how we will find the components name?
|
Hi @Raghav3107,
|
Thanks, @shubhamkulkarni97 for the answer. The esp32.project.ld file is not generated at your specified directory. Actually, the
The command I m using for build |
@Raghav3107 I don't find any obvious issue in your CMakeLists.txt. Could try running verbose CMake build to check if there is some issue while build? |
Hello @shubhamkulkarni97 Also, here the repository on which I m working? link |
Hi @Raghav3107, There are a few issues with the implementation in CMakeLists.txt in your repo.
Please review your CMakeLists.txt as per https://github.com/shubhamkulkarni97/amazon-freertos-examples/blob/feature/idf_v4.2/CMakeLists.txt Hope this helps! Thanks, |
Hello @shubhamkulkarni97 Actually, I want to run the demos file outside of the amazon-freertos(in main folder) and instead of config the demo I want to call direct the function which I want. For that, I created the demoRunner.c and demoRunner.h file in which works the same as iot_demo_freertos.c and instead of calling the You can see all this file is in same folder i.e main but when I m building it. It is not able to find the
I also tried to build the program by putting |
Thanks, @shubhamkulkarni97 for your help I fixed the issue by making a change in a top-level CMakeList.
And all thing is working perfectly. If possible can you give any input on this issue -> #3215 Thanks! |
Hello @shubhamkulkarni97
Can you tell me if we have the multiple components in components directory, then how we will link this all this components with top level CMakeLists.txt
I tried using this step
But that did not work. |
@Raghav3107 You can implement in the following way:
Hope this helps! |
Hello developers,
For my project, I build the repository based on this documentation where I m using the amazon-freertos as an external library.
Specification.
Amazon-freertos version 202006 and esp-idf v4.2.2.
Repository looks like
Here, when I building the demo, it throws the error.
Now the
runDemoTaskCustom function
insrc/ directory
and the header file is insrc/include directory
but still shows the undefined reference. Also, tried to use extern but throws the same error.So, I made some small changes in the top-level CMake
Here, at build time I got error
src/main.c.obj -MF CMakeFiles/afr_demo.dir/src/main.c.obj.d -o CMakeFiles/afr_demo.dir/src/main.c.obj -c ../src/main.c
../src/main.c:49:10: fatal error: esp_wifi.h: No such file or directory
#include "esp_wifi.h"
^~~~~~~~~~~~
compilation terminated.
For that, I include the directory of esp_wifi. h file which we can see in the Cmake file after I got another error for missing file
So, I think esp-idf components are not linked with the top-level CMake. But in CMake, we already set the esp-idf directory.
set(esp_idf_dir "${CMAKE_CURRENT_LIST_DIR}/freertos/vendors/espressif/esp-idf")
So, why esp-idf components files are not linking with the top-level
CMakeList.txt
file?The text was updated successfully, but these errors were encountered: