summaryrefslogtreecommitdiff
path: root/ports/zephyr/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/zephyr/main.c')
-rw-r--r--ports/zephyr/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/zephyr/main.c b/ports/zephyr/main.c
index 9addd7d6c..eaef34a78 100644
--- a/ports/zephyr/main.c
+++ b/ports/zephyr/main.c
@@ -99,6 +99,7 @@ static void vfs_init(void) {
mp_obj_t bdev = NULL;
mp_obj_t mount_point;
const char *mount_point_str = NULL;
+ qstr path_lib_qstr = MP_QSTRnull;
int ret = 0;
#ifdef CONFIG_DISK_DRIVER_SDMMC
@@ -109,15 +110,18 @@ static void vfs_init(void) {
#endif
bdev = MP_OBJ_TYPE_GET_SLOT(&zephyr_disk_access_type, make_new)(&zephyr_disk_access_type, ARRAY_SIZE(args), 0, args);
mount_point_str = "/sd";
+ path_lib_qstr = MP_QSTR__slash_sd_slash_lib;
#elif defined(CONFIG_FLASH_MAP) && FIXED_PARTITION_EXISTS(storage_partition)
mp_obj_t args[] = { MP_OBJ_NEW_SMALL_INT(FIXED_PARTITION_ID(storage_partition)), MP_OBJ_NEW_SMALL_INT(4096) };
bdev = MP_OBJ_TYPE_GET_SLOT(&zephyr_flash_area_type, make_new)(&zephyr_flash_area_type, ARRAY_SIZE(args), 0, args);
mount_point_str = "/flash";
+ path_lib_qstr = MP_QSTR__slash_flash_slash_lib;
#endif
if ((bdev != NULL)) {
mount_point = mp_obj_new_str_from_cstr(mount_point_str);
ret = mp_vfs_mount_and_chdir_protected(bdev, mount_point);
+ mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(path_lib_qstr));
// TODO: if this failed, make a new file system and try to mount again
}
}