adafruit / adafruit/Adafruit_VS1053_Library
Using SDfat on RP2040 (earlephilhower core)
- Dominant language
- C++
- Stars
- 152
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Using the sdfat option with
`#define PREFER_SDFAT_LIBRARY 1`
causes many compiler errors.
I think it's the same as
[https://github.com/adafruit/Adafruit_VS1053_Library/issues/88](url)
```
In file included from C:\Users\test\AppData\Local\Temp\.arduinoIDE-unsaved202359-3360-1cplq83.wffl\player_simple\player_simple.ino:3:
c:\Users\test\Documents\Arduino\libraries\Adafruit_VS1053_Library/Adafruit_VS1053.h:341:3: error: 'File' does not name a type; did you mean 'SdFile'?
341 | File currentTrack; //!< File that is currently playing
| ^~~~
| SdFile
c:\Users\test\Documents\Arduino\libraries\Adafruit_VS1053_Library/Adafruit_VS1053.h:359:31: error: 'File' has not been declared
359 | unsigned long mp3_ID3Jumper(File mp3);
| ^~~~
In file included from C:\Users\test\AppData\Local\Temp\.arduinoIDE-unsaved202359-3360-1cplq83.wffl\player_simple\player_simple.ino:5:
C:\Users\test\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.2.2\libraries\SD\src/SD.h:232:16: error: conflicting declaration 'SDClass SD'
232 | extern SDClass SD;
| ^~
In file included from C:\Users\test\AppData\Local\Temp\.arduinoIDE-unsaved202359-3360-1cplq83.wffl\player_simple\player_simple.ino:3:
c:\Users\test\Documents\Arduino\libraries\Adafruit_VS1053_Library/Adafruit_VS1053.h:24:14: note: previous declaration as 'SdFat SD'
24 | extern SdFat SD;
| ^~
C:\Users\test\AppData\Local\Temp\.arduinoIDE-unsaved202359-3360-1cplq83.wffl\player_simple\player_simple.ino: In function 'void setup()':
C:\Users\test\AppData\Local\Temp\.arduinoIDE-unsaved202359-3360-1cplq83.wffl\player_simple\player_simple.ino:49:25: error: could not convert 'FatVolume::open(const char*, oflag_t)(((const char*)"/"), 0)' from 'File32' to 'fs::File'
49 | printDirectory(SD.open("/"), 0);
| ~~~~~~~^~~~~
| |
| File32
Multiple libraries were found for "SD.h"
Used: C:\Users\test\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\3.2.2\libraries\SD
Not used: C:\Users\test\AppData\Local\Arduino15\libraries\SD
exit status 1
Compilation error: could not convert 'FatVolume::open(const char*, oflag_t)(((const char*)"/"), 0)' from 'File32' to 'fs::File
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the compilation failure on an RP2040 board using core 3.2.2, PREFER_SDFAT_LIBRARY 1, and the player_simple example. Inspect Adafruit_VS1053.h alongside the RP2040 SD.h and compare the related issue 88; done means the example compiles without File, SD, or File32 type conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100