summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/main.c
diff options
context:
space:
mode:
authorJosef Gajdusek <atx@atx.name>2015-05-06 00:19:26 +0200
committerDamien George <damien.p.george@gmail.com>2015-05-06 22:04:20 +0100
commitbda7041294e0446c9909fe18c4826dd0bcfb9fc4 (patch)
treef98222f3ca7bfc3817a9a272fa9cbdeb9f5a71b4 /esp8266/main.c
parentd39d96b70045d82f207f9bb8d1908aeb40b75b7c (diff)
downloadmicropython-bda7041294e0446c9909fe18c4826dd0bcfb9fc4.tar.gz
micropython-bda7041294e0446c9909fe18c4826dd0bcfb9fc4.zip
esp8266: Add support for frozen modules
Diffstat (limited to 'esp8266/main.c')
-rw-r--r--esp8266/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index 81618cd63f..59b415c1d9 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -32,6 +32,7 @@
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
+#include "py/frozenmod.h"
#include "py/gc.h"
#include "pyexec.h"
#include "gccollect.h"
@@ -46,6 +47,10 @@ STATIC void mp_reset(void) {
mp_init();
mp_obj_list_init(mp_sys_path, 0);
mp_obj_list_init(mp_sys_argv, 0);
+#if MICROPY_MODULE_FROZEN
+ mp_lexer_t *lex = mp_find_frozen_module("main", 4);
+ mp_parse_compile_execute(lex, MP_PARSE_FILE_INPUT, mp_globals_get(), mp_locals_get());
+#endif
}
void soft_reset(void) {