I was able to partition the disk space into a FAT and littleFS sections using this code.
boot.py looks like thisimport os, pyb
os.umount('/flash')
p1 = pyb.Flash(start=0, len=40*1024)
p2 = pyb.Flash(start=40*1024)
os.VfsFat.mkfs(p1)
os.VfsLfs2.mkfs(p2)
os.mount(p1, '/flash')
os.mount(p2, '/data')
os.chdir('/flash')
looking at the status of each partition returns thisimport os, pyb
p2 = pyb.Flash(start=40*1024)
os.mount(p2, '/data')
Now here is my question:>>> os.listdir('/')
['flash', 'data']
>>> os.statvfs('/data')
(512, 512, 144, 142, 142, 0, 0, 0, 0, 255)
>>> os.statvfs('/flash')
(512, 512, 46, 42, 42, 0, 0, 0, 0, 255)
>>>
the FAT system in windows shows the size as 23KB--about 1/2 of what I expected (40*1024 in the code above).
However, the statvfs returns values that are pretty much what Windows reports.
So why the discrepancy?
Everything else works as expected. I can read and write to both partitions.