summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-16 00:33:33 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-16 00:33:33 +0300
commit724b82559db88770dd39efab8365cf2a90e7ec97 (patch)
tree0d7658a2a77fda488630c4900c1b10386c98d165
parent87e426c7c78051ef817f022c6df7c320a00eba1d (diff)
downloadmicropython-724b82559db88770dd39efab8365cf2a90e7ec97.tar.gz
micropython-724b82559db88770dd39efab8365cf2a90e7ec97.zip
zephyr/main: Initialize sys.path and sys.argv.
-rw-r--r--zephyr/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zephyr/main.c b/zephyr/main.c
index 250e51a2f5..0d381f0102 100644
--- a/zephyr/main.c
+++ b/zephyr/main.c
@@ -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