summaryrefslogtreecommitdiff
path: root/stm/main.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-18 00:06:37 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-18 00:06:37 +0200
commit4aee119f940b15da16c5e3609bb904f5e881a3df (patch)
tree2e5cb7cf0203a0eb7b67cce0713ca6d29fe31a90 /stm/main.c
parentc839584222121e60fd8ae1787e08930463d9ae52 (diff)
stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].
This is compatible with what search path was before sys.path refactor, with addition of module library path ("0:/lib").
Diffstat (limited to 'stm/main.c')
-rw-r--r--stm/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stm/main.c b/stm/main.c
index dabbaf1b0..33af85351 100644
--- a/stm/main.c
+++ b/stm/main.c
@@ -411,6 +411,11 @@ soft_reset:
// Micro Python init
qstr_init();
rt_init();
+ mp_obj_t def_path[3];
+ def_path[0] = MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_);
+ def_path[1] = MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_src);
+ def_path[2] = MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_lib);
+ sys_path = mp_obj_new_list(3, def_path);
#if MICROPY_HW_HAS_LCD
// LCD init (just creates class, init hardware by calling LCD())