Skip to content

Commit 4e50fe8

Browse files
Add LittleFS, SD, and SDFS Filesystems and File:: interface (earlephilhower#49)
Pull in the ESP8266 File/Dir/etc. filesystem and port LittleFS and SD/SDFS to the RP2040. See https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html for more information
1 parent 1eb48f7 commit 4e50fe8

File tree

28 files changed

+3453
-9
lines changed

28 files changed

+3453
-9
lines changed

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
[submodule "system/pyserial"]
88
path = tools/pyserial
99
url = https://github.com/pyserial/pyserial.git
10+
[submodule "libraries/LittleFS/lib/littlefs"]
11+
path = libraries/LittleFS/lib/littlefs
12+
url = https://github.com/littlefs-project/littlefs.git
13+
[submodule "libraries/SdFat"]
14+
path = libraries/SdFat
15+
url = https://github.com/earlephilhower/ESP8266SdFat.git
1016
[submodule "pico-extras"]
1117
path = pico-extras
1218
url = https://github.com/raspberrypi/pico-extras.git

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,17 @@ Them hit the upload button and your sketch should upload and run.
6666
In some cases the Pico will encounter a hard hang and its USB port will not respond to the auto-reset request. Should this happen, just
6767
follow the initial procedure of holding the BOOTSEL button down while plugging in the Pico to enter the ROM bootloader.
6868
69-
# Uploading with Picoprobe
69+
# Uploading Filesystem Images
70+
The onboard flash filesystem for the Pico, LittleFS, lets you upload a filesystem image from the sketch directory for your sketch to use. Download the needed plugin from
71+
* https://github.com/earlephilhower/arduino-pico-littlefs-plugin/releases
72+
73+
To install, follow the directions in
74+
* https://github.com/earlephilhower/arduino-pico-littlefs-plugin/blob/master/README.md
75+
76+
For detailed usage information, please check the ESP8266 repo documentation (ignore SPIFFS related notes) available at
77+
* https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html
78+
79+
# Uploading Sketches with Picoprobe
7080
If you have built a Raspberry Pi Picoprobe, you can use OpenOCD to handle your sketch uploads and for debugging with GDB.
7181
7282
Under Windows a local admin user should be able to access the Picoprobe port automatically, but under Linux `udev` must be told about the device and to allow normal users access.
@@ -88,15 +98,17 @@ The installed tools include a version of OpenOCD (in the pqt-openocd directory)
8898
Relatively stable and very functional, but bug reports and PRs always accepted.
8999
* digitalWrite/Read
90100
* shiftIn/Out
91-
* SPI master (tested using SdFat 2.0 https://github.com/greiman/SdFat ... note that the Pico voltage regulator can't reliably supply enough power for a SD Card so use external power, and adjust the `USE_SIMPLE_LITTLE_ENDIAN` define in `src/sdfat.h` to 0)
101+
* SPI master
92102
* analogWrite/PWM
93103
* tone/noTone
94-
* Wire/I2C Master and Slave (tested using DS3231 https://github.com/rodan/ds3231)
104+
* Wire/I2C Master and Slave
95105
* EEPROM
96106
* USB Serial(ACM) w/automatic reboot-to-UF2 upload)
97107
* Hardware UART
98-
* Servo
108+
* Servo, glitchless
99109
* Overclocking and underclocking from the menus
110+
* analogRead and Pico chip temperature
111+
* Filesystems (LittleFS and SD/SDFS)
100112
* I2S audio output
101113
* printf (i.e. debug) output over USB serial
102114
@@ -105,13 +117,9 @@ The RP2040 PIO state machines (SMs) are used to generate jitter-free:
105117
* Tones
106118
* I2S Output
107119
108-
# Todo
109-
Some major features I want to add are:
110-
* Installable filesystem support (SD, LittleFS, etc.)
111-
* Updated debug infrastructure
112-
113120
# Tutorials from Across the Web
114121
Here are some links to coverage and additional tutorials for using `arduino-pico`
122+
* The File:: class is taken from the ESP8266. See https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html
115123
* Arduino Support for the Pi Pico available! And how fast is the Pico? - https://youtu.be/-XHh17cuH5E
116124
* Pre-release Adafruit QT Py RP2040 - https://www.youtube.com/watch?v=sfC1msqXX0I
117125
* Adafruit Feather RP2040 running LCD + TMP117 - https://www.youtube.com/watch?v=fKDeqZiIwHg

0 commit comments

Comments
 (0)