samd/modules/_boot.py: Add /lib to sys.path.

Needed for mip to find a default location to install to.

Like esp32, samd uses "/" as the mount point for the flash. Make _boot.py
add the entry after successfully mounting.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared 2023-08-16 15:08:50 +10:00 committed by Damien George
parent 3cc3e4e032
commit f52a2cd55a
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import gc
import os
import samd
import sys
bdev = samd.Flash()
@ -13,7 +14,8 @@ except:
fs_type.mkfs(bdev, progsize=256)
vfs = fs_type(bdev, progsize=256)
os.mount(vfs, "/")
sys.path.append("/lib")
del vfs, fs_type, bdev, os, samd
del vfs, fs_type, bdev, os, samd, sys
gc.collect()
del gc