File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,9 +52,6 @@ STATIC void mp_reset(void) {
5252 mp_obj_list_append (mp_sys_path , MP_OBJ_NEW_QSTR (MP_QSTR__slash_lib ));
5353 mp_obj_list_append (mp_sys_path , MP_OBJ_NEW_QSTR (MP_QSTR__slash_ ));
5454 mp_obj_list_init (mp_sys_argv , 0 );
55- #if MICROPY_VFS_FAT
56- memset (MP_STATE_PORT (fs_user_mount ), 0 , sizeof (MP_STATE_PORT (fs_user_mount )));
57- #endif
5855 MP_STATE_PORT (mp_kbd_exception ) = mp_obj_new_exception (& mp_type_KeyboardInterrupt );
5956 MP_STATE_PORT (term_obj ) = MP_OBJ_NULL ;
6057 MP_STATE_PORT (dupterm_arr_obj ) = MP_OBJ_NULL ;
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ void mp_init(void) {
9191 MP_STATE_VM (mp_module_builtins_override_dict ) = NULL ;
9292 #endif
9393
94+ #if MICROPY_FSUSERMOUNT
95+ // zero out the pointers to the user-mounted devices
96+ memset (MP_STATE_VM (fs_user_mount ), 0 , sizeof (MP_STATE_VM (fs_user_mount )));
97+ #endif
98+
9499 #if MICROPY_PY_THREAD_GIL
95100 mp_thread_mutex_init (& MP_STATE_VM (gil_mutex ));
96101 #endif
Original file line number Diff line number Diff line change @@ -439,9 +439,6 @@ int main(void) {
439439 mp_obj_list_append (mp_sys_path , MP_OBJ_NEW_QSTR (MP_QSTR__slash_flash_slash_lib ));
440440 mp_obj_list_init (mp_sys_argv , 0 );
441441
442- // zero out the pointers to the mounted devices
443- memset (MP_STATE_PORT (fs_user_mount ), 0 , sizeof (MP_STATE_PORT (fs_user_mount )));
444-
445442 // Initialise low-level sub-systems. Here we need to very basic things like
446443 // zeroing out memory and resetting any of the sub-systems. Following this
447444 // we can run Python scripts (eg boot.py), but anything that is configurable
You can’t perform that action at this time.
0 commit comments