507ad03329
It is currently not enabled by default on any board.
16 lines
275 B
Python
16 lines
275 B
Python
import os
|
|
import machine, rp2
|
|
|
|
|
|
# Try to mount the filesystem, and format the flash if it doesn't exist.
|
|
bdev = rp2.Flash()
|
|
try:
|
|
vfs = os.VfsFat(bdev)
|
|
os.mount(vfs, "/")
|
|
except:
|
|
os.VfsFat.mkfs(bdev)
|
|
vfs = os.VfsFat(bdev)
|
|
os.mount(vfs, "/")
|
|
|
|
del os, bdev, vfs
|