Skip to content

ESP32: Wrong library used for "SD.h" #1548

Closed
@AndreKR

Description

@AndreKR

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

  1. 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).
  2. Install the ESP32 core via the board manager
  3. Set the board to for example "ESP32 Dev Module"
  4. 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

Metadata

Metadata

Assignees

Labels

conclusion: invalidIssue/PR not validtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions