-
-
Notifications
You must be signed in to change notification settings - Fork 398
ESP32: Wrong library used for "SD.h" #1548
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
Comments
Hi @AndreKR. Thanks for your report. This is caused by an intentional change to the Arduino CLI tool that handles the compilation process for the Arduino IDE. The full details on that change, and how it can cause the loss of priority for the platform bundled libraries in rare cases such as the one you experienced, are provided here: #1292 The fix for that has already been made in the ESP32 boards platform (espressif/arduino-esp32@de66c39), which was released in ESP32 boards 2.0.0. However, you are using an older version of the ESP boards platform (1.0.6), which doesn't have that change. So you can pick one of the following options for fixing this:
|
This is because Arduino IDE 2.x only shows the already installed version of the platform if you don't have the platform's package index URL in your preferences. Arduino IDE 2.x has a completely different preferences storage system from the classic Arduino IDE, so the preferences from the classic Arduino IDE are not used by Arduino IDE 2.x. Please try this:
Now you will be able to use Boards Manager to update the ESP32 boards platform to the latest version. After doing that, the correct SD library will be used. |
That worked. Using the Preferences dialog also switched the IDE to the light theme. :) By the way, why is the 2.0 version ignored by Arduino IDE 1.8, I don't see any obvious differences in the JSON? |
Ah, never mind, I was using a different board URL in Arduino IDE 1.8: |
This bug is being tracked at arduino/arduino-ide#530 |
Describe the bug
Compiling a sketch that includes
<SD.h>
for ESP32 fails with a "Architecture or board not supported" error because the wrong library is used.To Reproduce
Actual behavior
An error happens:
Expected behavior
Good question. I think the problem is there's an SD library bundled with the IDE and there is one bundled with the core and the one bundled with the IDE is used. Note that I have both Arduino 1.8 and Arduino 2.0 installed and I think the "Used" library comes from Arduino 1.8.
The error happens only in Arduino 2.0, so how does Arduino 1.8 handle this? I would assume the library from the core should take precedence over the library from the IDE?
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: