From f52a2cd55afb3f487801aaa62e15328134eb73a4 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Wed, 16 Aug 2023 15:08:50 +1000 Subject: [PATCH] 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 --- ports/samd/modules/_boot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/samd/modules/_boot.py b/ports/samd/modules/_boot.py index 1ff51de59..93522e2ea 100644 --- a/ports/samd/modules/_boot.py +++ b/ports/samd/modules/_boot.py @@ -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