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
517e1706
Commit
517e1706
authored
Feb 17, 2014
by
Damien George
Browse files
Merge pull request #309 from pfalcon/stm-sys-path
stm: Initialize sys.path with ["0:/", "0:/src", "0:/lib"].
parents
ff77dc56
4aee119f
Changes
3
Hide whitespace changes
Inline
Side-by-side
py/makeqstrdata.py
View file @
517e1706
...
...
@@ -10,6 +10,8 @@ elif platform.python_version_tuple()[0] == '3':
# add some custom names to map characters that aren't in HTML
codepoint2name
[
ord
(
'.'
)]
=
'dot'
codepoint2name
[
ord
(
':'
)]
=
'colon'
codepoint2name
[
ord
(
'/'
)]
=
'slash'
# this must match the equivalent function in qstr.c
def
compute_hash
(
qstr
):
...
...
stm/main.c
View file @
517e1706
...
...
@@ -367,6 +367,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())
...
...
stm/qstrdefsport.h
View file @
517e1706
...
...
@@ -32,3 +32,7 @@ Q(Usart)
Q
(
ADC
)
Q
(
open
)
Q
(
File
)
// Entries for sys.path
Q
(
0
:/
)
Q
(
0
:/
src
)
Q
(
0
:/
lib
)
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