Hello everyone, i would like to include this LoRaWAN Component in my projecthttps://github.com/TobleMiner/lmic-esp-idf but I always get a compilation error. Could someone kindly, guide me to how to include the library (what modification I should do in the CMake file and where is the directory should be) or give me a link to a source that explain this.
Thank you
A guide on how to add a component into a project
Re: A guide on how to add a component into a project
Did you clone the library into the components subdirectory of your project?
What is your project structure?
What compile errors are you getting?
What is your project structure?
What compile errors are you getting?
Re: A guide on how to add a component into a project
Hi, thank you for your replay.....
I copy it into a folder that I created inside the "main" folder and add the line
To the CMake file inside the main folder.
my project structure is like
I copy it into a folder that I created inside the "main" folder and add the line
Code: Select all
idf_component_register(SRCS
"main.c"
INCLUDE_DIRS
"."
"./Lib/LoRaWAN"
)
my project structure is like
Re: A guide on how to add a component into a project
Please read the Build system documentation part specifically where it specifies what is the right directory structure:
https://docs.espressif.com/projects/esp ... le-project
https://docs.espressif.com/projects/esp ... le-project
Code: Select all
myProject/
- CMakeLists.txt
- sdkconfig
- components/ - component1/ - CMakeLists.txt
- Kconfig
- src1.c
- component2/ - CMakeLists.txt
- Kconfig
- src1.c
- include/ - component2.h
- main/ - CMakeLists.txt
- src1.c
- src2.c
- build/
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design
Re: A guide on how to add a component into a project
Thank you for sharing this. I modified the directories as it's shown but I'm still struggling to register the component.
This is My Top Level CMakeLists:
This is the inside main folder CMakeLists
This is the Inside the LoRaWAN component folder CmakeLists file
please help
This is My Top Level CMakeLists:
This is the inside main folder CMakeLists
This is the Inside the LoRaWAN component folder CmakeLists file
please help
Re: A guide on how to add a component into a project
First of all, I see you didn’t read the Build system like I recommended and just focused to solve the problem.
But sometimes you need to put the problem aside and read documentation in order to come with a proper solution.
Also the error is clearly indicating that the component is not found in that directory. I guess at this point so long after your post you should have solve this anyways. Best!
But sometimes you need to put the problem aside and read documentation in order to come with a proper solution.
Also the error is clearly indicating that the component is not found in that directory. I guess at this point so long after your post you should have solve this anyways. Best!
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design
Who is online
Users browsing this forum: No registered users and 234 guests