arduino-esp32 IDF component build failure

gpeyton
Posts: 2
Joined: Sun Apr 12, 2020 7:44 pm

arduino-esp32 IDF component build failure

Postby gpeyton » Sun Apr 12, 2020 9:37 pm

I am trying to add the Arduino library as a component, following these instructions:
https://github.com/espressif/arduino-es ... mponent.md

I am able to reproduce the error found here:
https://github.com/espressif/arduino-esp32/issues/3457

Procedure:
- Checkout v4.1-beta1 IDF branch, and reinstall IDF with Eclipse
- Add hello_world project to Eclipse and ensure hello_world builds
- Follow the guide to add arduino-esp32 as a component
- Refresh project in Eclipses and rebuild

It fails with:

Code: Select all

CMake Error at ~/esp/esp-idf/tools/cmake/build.cmake:186 (message):
  Failed to resolve component 'ethernet'.
...
FAILED: build.ninja 
Please can you let me know if there is a fix or workaround for this? At the moment, the Arduino library is completely unusable as a component, but I need to use it.

Thanks!

DerrickLau
Posts: 1
Joined: Mon Apr 13, 2020 9:09 pm

Re: arduino-esp32 IDF component build failure

Postby DerrickLau » Mon Apr 13, 2020 9:13 pm

I had this problem before and made some modifications to the Arduino-esp32 IDF component to make it work. Mine works with the DFPlayer sample.

I posted my code changes here:
https://github.com/DerrickLau/esp32-arduino-port

Just grab a copy of the files and put into /esp-idf/component/Arduino directory and then build your program as usual. It should work.

Are you saying you tried building with my port and it failed?

gpeyton
Posts: 2
Joined: Sun Apr 12, 2020 7:44 pm

Re: arduino-esp32 IDF component build failure

Postby gpeyton » Wed Apr 15, 2020 3:32 am

Thanks for your response. I tried adding it as you said, but still get the same build failure. Are you using Eclipse to build?

daneast
Posts: 9
Joined: Wed Apr 22, 2020 11:26 am

Re: arduino-esp32 IDF component build failure

Postby daneast » Wed Apr 29, 2020 3:00 pm

I have also tried building with Derrick's modified version and get the same thing as the official version. "Failed to resolve component 'ethernet'." This would have to break a ton of projects that incorporate Arduino libraries.

daneast
Posts: 9
Joined: Wed Apr 22, 2020 11:26 am

Re: arduino-esp32 IDF component build failure

Postby daneast » Fri May 01, 2020 1:01 am

The codebase between the SDK and this Arduino component have deviated too much. For example, the ethernet component is now named esp_eth. I started to pull all of the headers out of the SDK and update those in the Arduino component but it is just too tedious to do manually. All of the needed include files are in deeper subdirectories in the SDK, then it isn't clear what all is actually needed, etc. Simply replacing the ethernet component headers with the esp_eth headers, and updating the makefile list, does not work - the other headers are not compatible.

Another note on Derrick's fork of the repo above, is that it has some hardcoded paths like "C:/Derrick/", so it won't work on anyone else's environment but his. Plus it also is based on an older version of the SDK that still has the ethernet component instead of esp_eth.

abansal22
Posts: 20
Joined: Wed Apr 22, 2020 8:24 am

Re: arduino-esp32 IDF component build failure

Postby abansal22 » Sun May 03, 2020 5:35 am

gpeyton wrote:
Sun Apr 12, 2020 9:37 pm
I am trying to add the Arduino library as a component, following these instructions:
https://github.com/espressif/arduino-es ... mponent.md

I am able to reproduce the error found here:
https://github.com/espressif/arduino-esp32/issues/3457

Procedure:
- Checkout v4.1-beta1 IDF branch, and reinstall IDF with Eclipse
- Add hello_world project to Eclipse and ensure hello_world builds
- Follow the guide to add arduino-esp32 as a component
- Refresh project in Eclipses and rebuild

It fails with:

Code: Select all

CMake Error at ~/esp/esp-idf/tools/cmake/build.cmake:186 (message):
  Failed to resolve component 'ethernet'.
...
FAILED: build.ninja 
Please can you let me know if there is a fix or workaround for this? At the moment, the Arduino library is completely unusable as a component, but I need to use it.

Thanks!
i am using arduino as a component in esp idf 4.0. I am using the vs code. I use the platform io and the espressif extension in the vs code all goes well.

Please follow these steps:
1. download the arduino compatable with the idf version 4.0. Here is the link
https://github.com/espressif/arduino-es ... lease/v4.0

2. install the esp idf in ecllipse as followed by this link.
https://github.com/espressif/idf-eclipse-plugin

3. Now open the hello world project and make a new directory called the "components" (please make the directory of this specific name only). copy the downloaded arduino folder in the components directory.

4. Now we need to configure one more thing only. Now open the sdk configuration editor( as describe in step 2. url). Go to the Component config -> mbedTLS-> TLS Key Exchange Methods->Enable pre-shared-key ciphersuites . enable this option and we are good to go.

5. Now build the project it should be compiled properly.

Please let me know if you need anything more .

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 31 guests