-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Successfully built arduino-esp32 as component on esp-idf v4.2 release #4702
Comments
I dont understand what the problem is when using the branch https://github.com/espressif/arduino-esp32/tree/idf-release/v4.2
|
Your adaptation works well for me. Well done. |
The idf/release-v4.2 branch is currently tied to idf master. That is nominally 4.2, although not the release version (a rose by any other name). It is unlikely that esp32s2 + arduino will work with release 4.2- definitely not the USB. |
Thanks for your work. Working right now on the same problem. Just got started with this task. Got any hints for me what to look out for? Any good reads? |
If you are not familiar with building esp-idf, I would recommend using lib-builder or my docker container |
@lbernstone i couldn't find adequate documentation for this process. the tool and it's README do not explain at all what it actually does. |
@lbernstone I saw that. But what does it do? Does it convert a specific Arduino library? |
So, after spending the rest of the evening ... Platform.io specific... figuring out how platform.io works and how everything is pulled together, this is what I found out:
Generic
|
@joshwapohlmann |
I can't express how happy I am that this finally worked. Thank you @summivox I just followed the instructions here: https://github.com/summivox/arduino-esp32/blob/mod-idf-v4.2/docs/esp-idf_component.md |
Hello everyone, First of all, thanks to @summivox for the solution, I spent a whole lot of time figuring this out and after finding this I was finally able to make it work! As of now, what I'm trying to do is use the 1.22.0-80-g6c4433a5-5.2.0 toolchain to compile basic ESP-IDF examples, the reason to use this older toolchain is because I also want to run some Amazon FreeRTOS demos downloaded from the AWS console. As of now, it seems 1.22.0-80-g6c4433a5-5.2.0 refers to ESP-IDF v3.3 and cannot compile v4.+ projects, even the most basic ones. Does anyone know if arduino-esp32 works with the 1.22.0-80-g6c4433a5-5.2.0 toolchain? I'll post my progress as I go through it. Thanks! |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Hello, Please can anybody point a way to add arduino as IDF component and the IDf version to be use, I have tried all without success for 2 days and nights now. The fork of @summivox was promising but I ended up with a PIN_CONFIG error If any of you could kidly address me to a correct way to add arduino as idf component (specifying the versions of IDF to be used) I commit to make a very clearly explained guide on how to do it and how to encrypt the ESP flash, which is why many people are driven to IDF. |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
Custom partitions (via partitions.csv) are handled by the Arduino IDE. If you need custom partitions with an IDF build, use the IDF functionality in menuconfig (https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-partition-table-custom-filename). |
Yes @lbernstone thank you for sharing your Docker project which is very useful for standard projects. Unfortunately in my case I need to substitute bootloader, app and ota |
If you look in the sdkconfig.h of whatever arduino you are trying to build, you can see the idf commit ( |
After many trials I have successfully built a project using Arduino IDF as component (but unfortunately with flash encryption not enabled as I am still working to make that work) Here I share my experience. I am on Windows 10. 1 - It is very easy to install the IDF stack on Windows 10 as there is the Tools Installers at this link 2 - notice that in Arduino Core ESP32 there is a setting that tell us which IDF version to use with Arduino Master component as kindly suggested in this post by @lbernstone So select (2.1) - At time of writing the first proposed version by IDF Tool Installers in the list is the 4.3.1, if you installed IDF version 4.3.1 and then built Arduino as component it will not work and will give you an error like I had experienced initially here (2.2) - Check which IDF version you have with
(2.3) - To change IDF version:
3 - now you can make a copy of the 'hello world' example and navigate in that folder 4- install Arduino component there (it will install master as showed on official website)
4 - use
C:\Users\YOUR_USER_NAME\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\tools\partitions just copy the C:\Users\YOUR_USERNAME\esp\esp-idf\examples\hello_worldMy
(details 5 - use It should work Unfortunately:
you will end up with this error I am still working on this My aim is to make a guide that works for encrypting ESP32 flash as explained here but I need to manage to build with flash encryption option enable I am doing all this because my application is flash encryption. To have the solution for flash encryption just do as explained here |
Thank you for the instruction. |
@summivox I'm closing this issue, seems it's not relevant anymore. Current Arduino ESP32 core v2.0.2 works with IDF v4.4. How to set it up is explained step by step here: https://docs.espressif.com/projects/arduino-esp32/en/latest/esp-idf_component.html If needed, please reopen it. Thanks for your contribution! |
|
@summivox thank you so much, |
After a whole afternoon googling around, I was finally able to build an esp-idf project with arduino-esp32 as a component.
I have committed my changes to my fork of this repo. This fork can be built without errors (see readme in the fork), in case someone else wants to try this approach.
I understand that v4.2 is not HEAD, and the component use case is not as popular as directly using the Arduino IDE. However, I do believe there is value in making this work for at least one known v4.x release, since HEAD of this repo does not work (as of now) with v4.3 release.
I'd love to hear feedback, specifically whether this works or not for you, and suggestions on how I can contribute my changes upstream.
The text was updated successfully, but these errors were encountered: