Closed
Description
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
- This might be a relevant step: I have Arduino 1.8 installed normally and I am running Arduino 2.0 from the ZIP (not installed).
- Install the ESP32 core via the board manager
- Set the board to for example "ESP32 Dev Module"
- Compile this sketch: (The one line is enough to reproduce the issue.)
#include <SD.h>
Actual behavior
An error happens:
C:\Program Files (x86)\Arduino\libraries\SD\src/utility/Sd2PinMap.h:524:2: error: #error Architecture or board not supported.
#error Architecture or board not supported.
^
Multiple libraries were found for "SD.h"
Used: C:\Program Files (x86)\Arduino\libraries\SD
Not used: C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\SD
Compilation error: Error: 13 INTERNAL: exit status 1
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):
- OS: Windows
- Version: 2.0.0-beta.12