Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
cb861a5c
Commit
cb861a5c
authored
Apr 13, 2014
by
Damien George
Browse files
stm[hal]: Init mp_sys_path and mp_sys_argv correctly.
parent
5bb7d991
Changes
2
Hide whitespace changes
Inline
Side-by-side
stm/main.c
View file @
cb861a5c
...
...
@@ -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
();
...
...
stmhal/main.c
View file @
cb861a5c
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment