In order to scale the size set of for internal file system you can add a custom linker script like for microbit:
https://github.com/micropython/micropyt ... icrobit.ld
Point to your custom linker script holding the size you want to override in the mpconfigboard.mk instead of the default linker script.
It is possible to swap out the microbitfs with FATFS, or add it in addition for external storage. There is a discussion with experiments and findings in the old repository for the port:
https://github.com/tralamazza/micropython/issues/96
The the experiements it was basically found that FATFS on internal flash used a bit to much in overhead, at least for nrf51 and in practice also for nrf52. The findings were that 50 pages had to be reserved in order to even make the FATFS structures, then the file storage came on top of this. If i recall correctly, if you set of 64k for filesystem on nrf51 (page size 1k) 50 pages was to be reserved for the FS, and the last 14 pages of 1k will be available for storage. For nrf52 it was even worse, 50 pages resulted in only using the top 1k of each 4k page in physical flash, needing 200k only for the FS itself. Then data on top of this.
The conclusion was to go for the microbitfs as default, with its limitations, for internal storage as it utilizes flash much better when the flash storage is limited, and use the possibility to plug in FATFS for external usage (SD cards etc.) using VFS. It should be possible to run the microbitfs and FATFS in paralell using VFS, pointing internal to microbitfs and external to FATFS based on mounting point.
Personally, when i need space, i enable the VFS and FATFS and run this on SPI to a SD card. Storing py files on the SD card. From my experience, loading big .py files from SD often triggers micropython compiler out of ram issues. So maybe, cross compiling them first is better.
https://github.com/micropython/micropyt ... mountsd.py
You can try to play with the MICROPY_VFS/MICROPY_VFS_FAT in mpconfigport.h in combo with the make flag in MICROPY_FATFS=1.
For more detailed description of this:
https://github.com/micropython/micropyt ... ropy_fatfs
https://github.com/micropython/micropyt ... 8be14587ec
Hope this was to some help