From a0d0b27faf0bc76ede0fbc595f641fdceb04ac56 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 1 Sep 2017 16:12:26 -0400 Subject: Fix issue #207, esp8266 file operations problems (#222) The frozen module `_boot.py` was not being loaded on restart because `pyexec_frozen_module()` did not know about the new `.frozen` pseudo-directory. Updated lower-level routine to look in the right place. Also made ".frozen" and related values be `#define`s. --- esp8266/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'esp8266') diff --git a/esp8266/main.c b/esp8266/main.c index 4f41adb69..49c454e72 100644 --- a/esp8266/main.c +++ b/esp8266/main.c @@ -29,6 +29,7 @@ #include "py/nlr.h" #include "py/compile.h" +#include "py/frozenmod.h" #include "py/runtime0.h" #include "py/runtime.h" #include "py/stackctrl.h" @@ -98,8 +99,8 @@ STATIC void mp_reset(void) { 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_lib)); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_)); - // Frozen modules are in their own pseudo-dir, ".frozen". - mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__dot_frozen)); + // Frozen modules are in their own pseudo-dir, e.g., ".frozen". + mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR)); mp_obj_list_init(mp_sys_argv, 0); MP_STATE_PORT(term_obj) = MP_OBJ_NULL; -- cgit v1.2.3