I have added extra/rp_common/picocalc_fat32.fs for incorporating convenient filesystem access. It automatically compiles to flash and reboots, so there is no need to issue compile-to-flash before it.
It should be loaded after extra/common/setup_blocks_fat32.fs and, if you are using a Pimoroni Pico Plus 2 or Pico Plus 2 W, extra/rp2350/setup_pico_plus_2_psram_fat32.fs.
It adds the words blocks-fs@ ( – fs ) and blocks-fs: ( – ), if extra/common/setup_blocks_fat32.fs has been loaded; sd-fs@ ( – fs ) and sd-fs: ( – ), unless an identifier no-sd-fs is defined; and psram-fs@ ( – fs) and psram-fs: ( – ), if extra/rp2350/setup_pico_plus_2_psram_fat32.fs has been loaded.
blocks-fs@, sd-fs@, and psram-fs@ return FAT32 filesystem objects.
blocks-fs:, sd-fs:, and psram-fs: change the current filesystem to the selected FAT32 filesystem.
blocks-fs@ and blocks-fs: pertain to the FAT32 filesystem in on-board block storage. sd-fs@ and sd-fs: pertain to the FAT32 filesystem on the SD card. psram-fs@ and psram-fs: pertain to the FAT32 filesystem in PSRAM.
Warning: from trying out an old microSDHC card of mine that I had previously used with zeptoforth on my microSD({H,X}C) adapter board as test, it seems that there may be issues with the zeptoforth FAT32 implementation, because I ran into invalid date errors reported by zeptoforth, and when I ran the card through dosfsck a good few errors were listed and it ended up corrupting the card further to the point that I had to run mkdosfs. As a result, before using an SD card with zeptoforth I suggest backing up its contents if you care about them. If you get any errors with SD cards aside from things such as simple timeout errors which are unlikely to be filesystem-related, please report them to me so I can sort out any issues with the zeptoforth FAT32 implementation.
Updates:
I have identified a couple significant bugs in the zeptoforth FAT32 implementation which I am busy putting together a 1.13.2 release to fix. These fixes will not break your existing FAT32 filesystems but will reduce the chances of breakage and increase compatibility with outside FAT32 filesystems on SD cards.
Another update:
zeptoforth 1.13.2 is out. This release updates the USB VID:PID for the USB CDC console (note that you will not most likely be using this for the PicoCalc), adds online help for zeptoed, fixes bugs with parent directory handling and new directory cluster initialization w.r.t. FAT32 support, and fixes a bug in flush-console w.r.t. the USB CDC console that was causing stack underflows. It is highly recommended you install this, particularly as it includes important fixes to compatibility with existing FAT32 filesystems (previously .. support was broken, and many garbage files would appear if you attempted to run fsck.fat against an SD card which had been used with zeptoed; note that this does not fix existing directories created with zeptoforth in the past).
Note that this release does not contain PicoCalc support, which is still limited to the picocalc-devel branch, as this is still beta and will be until I get the chance to test it on my own PicoCalc.
Yet another update:
If you are using the graphical PicoCalc terminal emulator, take a look at Turtle graphics in extra/rp_common/turtle_picocalc.fs. This enables conveniently drawing on the display using words similar to those traditionally available in Logo.