40f5ecd3a8
Main entry point is _boot.py which checks whether FAT FS in flash mountable, and if so, mounts it. Otherwise, it checks if flash is empty, and if so, performs initial module setup: makes FAT FS, configures default AP name, etc. As a last option, if flash is not empty, and could not be mounted, it means filesystem corruption, and warning message with instructions is printed in an infinite loop.
13 lines
235 B
Python
13 lines
235 B
Python
import uos
|
|
import builtins
|
|
from flashbdev import bdev
|
|
|
|
try:
|
|
vfs = uos.VfsFat(bdev, "/")
|
|
except OSError:
|
|
import inisetup
|
|
inisetup.check_bootsec()
|
|
uos.VfsFat.mkfs(bdev)
|
|
vfs = uos.VfsFat(bdev, "/")
|
|
inisetup.wifi()
|