Skip to content
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

Using SDfat on RP2040 (earlephilhower core) #90

Open
madias123 opened this issue Jun 9, 2023 · 1 comment
Open

Using SDfat on RP2040 (earlephilhower core) #90

madias123 opened this issue Jun 9, 2023 · 1 comment

Comments

@madias123
Copy link

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

 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 
@madias123
Copy link
Author

This could be fixed by
#87

Please accept this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant