zephyr/main: Initialize sys.path and sys.argv.

This commit is contained in:
Paul Sokolovsky 2016-12-16 00:33:33 +03:00
parent 87e426c7c7
commit 724b82559d
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ soft_reset:
gc_init(heap, heap + sizeof(heap));
#endif
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_init(mp_sys_argv, 0);
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
#if MICROPY_MODULE_FROZEN