Closed Deemocean closed 2 years ago
That library is incompatible with this core. We already have a File
class and include both the SDFS
and the SD
filesystems. Use those if you need to access a SD card as they hook into the core's entire File
ecosystem.
What if I want to use the LittleFS to access the External onboard flash on the Pico? I am trying to use WiFi.h and letting the board behave like a mass storage device at the same time. Is there an alternative for the Adafruit_SPIFlash
object? Because it is used in the callback function for msc in the Adafruit TinyUSB msc_external_flash
example.
Sorry, I don't use that at all. It's doubtful the host would understand LittleFS, anyway.
If you're just exporting flash memory, why not just use the flash read/write/erase calls directly?
I want to do a USB flash drive using the onboard flash(so I can send files over wifi to the flash and transfer to the device it connects to (as msc)). In the Adafruit TinyUSB's msc_external_flash
example(which "expose on-board external Flash as USB Mass Storage."), it basically requires me to format the flash to FAT12 manually first(gives about 1Mb of FAT12 storage), then uses their SPIFlash to access the flash and run their fork of SdFAT on the flash.
I guess LittleFS is really not meant to be used on anything related to MSC? (because no FAT support).
Are there any other options other than me migrating some of the features needed from the Adafruit fork SdFAT to the ESP8266 SdFAT(not sure if gonna work)--and make the SPIFlash use that library, in order to turn pico into a flash drive while fitting in the ESP8266 SdFAT ecosystem?
Sorry if this is just a weird use case, if there is currently no way I think I can just buy a SD breakout board.
I realized the Adafruit fork SdFAT is based on the original SdFat ver.1, which has classes like BlockDriver.
As the Arduino-pico core uses SdFat ver.2 I should probably ask this on the SdFat repo...
Thanks for the replay tho!
I was trying to use the WiFi lib and the Adafruit TinyUSB lib together as such:
During compilation, the IDE(both Arduino&PlatformIO) gives:
For sanity check, in the Arduino IDE, I tried to compile the
#include
statements mentioned above with Arduino Uno configuration, which builds successfully.Not sure if it is a problem with the Adafruit Fork SdFat or Arduino-pico.
My Environment: adafruit/Adafruit TinyUSB Library@^1.14.3 adafruit/SdFat - Adafruit Fork@^1.5.1 adafruit/Adafruit SPIFlash@^3.11.0