esp8266: Change default settings to mount flash at root dir.
This commit is contained in:
parent
1b3e372418
commit
e62235f8c7
@ -50,8 +50,8 @@ STATIC void mp_reset(void) {
|
||||
mp_init();
|
||||
mp_obj_list_init(mp_sys_path, 0);
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_flash_slash_lib));
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_flash));
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
|
||||
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
|
||||
mp_obj_list_init(mp_sys_argv, 0);
|
||||
MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
|
||||
MP_STATE_PORT(dupterm_arr_obj) = MP_OBJ_NULL;
|
||||
|
@ -5,9 +5,7 @@ from flashbdev import bdev
|
||||
|
||||
try:
|
||||
if bdev:
|
||||
vfs = uos.VfsFat(bdev)
|
||||
uos.mount(vfs, '/flash')
|
||||
uos.chdir('/flash')
|
||||
uos.mount(bdev, '/')
|
||||
except OSError:
|
||||
import inisetup
|
||||
vfs = inisetup.setup()
|
||||
|
@ -27,5 +27,5 @@
|
||||
// qstrs specific to this port, only needed if they aren't auto-generated
|
||||
|
||||
// Entries for sys.path
|
||||
Q(/flash)
|
||||
Q(/flash/lib)
|
||||
Q(/)
|
||||
Q(/lib)
|
||||
|
Loading…
Reference in New Issue
Block a user