Hi,
I have ported the AWS IoT SDK as an ESP32 IDF component.
I am using the mbedtls component of IDF, but have to add one header file (threading_alt.h) and change some options in /esp32/idf/components/mbedtls/port/include/mbedtls/esp_config.h.
My question is, what is the "best" way of doing this ?
Should I place the threading_alt.h file in the idf component dirs ?
Change esp_config.h in place ?
Copy the whole mbedtls dir to my projects component dir ?
I can't figure out a way to provide the additional include paths / settings to the mbedtls component due to my lack of knowledge in CMake.
Changing the components files will render them non functional if the code referenced in threading_alt.h is not provided by the app.
The threading_alt.h file is dependent on existing #ifdefs in mbedtls, but I don't know how to place the file in my apps / the sdks component dir and reference it from the mbedtls' build.
To me it seems, that I can only define the require of mbedtls by my app, but how do I tell the medtls components build about the location of the threading_alt.h file ?
Any guidance helps.
Best Practise for adding files to IDF standard component
-
- Posts: 5
- Joined: Thu Jul 29, 2021 7:57 am
Re: Best Practise for adding files to IDF standard component
Hi,
I'm in the same point as you. Could you share how did you solved this issue?
Many thanks!
I'm in the same point as you. Could you share how did you solved this issue?
Many thanks!
-
- Posts: 5
- Joined: Thu Jul 29, 2021 7:57 am
Re: Best Practise for adding files to IDF standard component
Ok, I found out.
You need first to enable the alternative threading from the sdkconfig (idf.py menuconfig)
Component config > mbedTLS > Enable the threading abstraction layer > Enable threading alternate implementation
And afterwads, add the following line to your project's CMakeLists.txt
include_directories(BEFORE {path_to_the_directory_contaning_threading_alt_h} )
It worked for me.
You need first to enable the alternative threading from the sdkconfig (idf.py menuconfig)
Component config > mbedTLS > Enable the threading abstraction layer > Enable threading alternate implementation
And afterwads, add the following line to your project's CMakeLists.txt
include_directories(BEFORE {path_to_the_directory_contaning_threading_alt_h} )
It worked for me.
Who is online
Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 71 guests