esp8266: Add support for frozen modules

This commit is contained in:
Josef Gajdusek
2015-05-06 00:19:26 +02:00
committed by Damien George
parent d39d96b700
commit bda7041294
4 changed files with 24 additions and 0 deletions

View File

@@ -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) {