Skip to content

Commit

Permalink
samd/modules/_boot.py: Add /lib to sys.path.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jimmo authored and dpgeorge committed Sep 1, 2023
1 parent 3cc3e4e commit f52a2cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ports/samd/modules/_boot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gc
import os
import samd
import sys

bdev = samd.Flash()

Expand All @@ -13,7 +14,8 @@
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

0 comments on commit f52a2cd

Please sign in to comment.