stm[hal]: Init mp_sys_path and mp_sys_argv correctly.

This commit is contained in:
Damien George 2014-04-13 13:19:09 +01:00
parent 5bb7d99175
commit cb861a5c6a
2 changed files with 7 additions and 7 deletions

View File

@ -239,11 +239,10 @@ soft_reset:
// Micro Python init
qstr_init();
mp_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);
mp_sys_path = mp_obj_new_list(3, def_path);
mp_obj_list_init(mp_sys_path, 0);
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_));
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_lib));
mp_obj_list_init(mp_sys_argv, 0);
exti_init();

View File

@ -264,8 +264,9 @@ soft_reset:
qstr_init();
mp_init();
mp_obj_list_init(mp_sys_path, 0);
mp_obj_list_append(mp_sys_argv, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_));
mp_obj_list_append(mp_sys_argv, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_lib));
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_));
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_0_colon__slash_lib));
mp_obj_list_init(mp_sys_argv, 0);
readline_init();