8000 esp32: Populate sys.path. · nickzoic/micropython-esp32@d4117d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit d4117d7

Browse files
committed
esp32: Populate sys.path.
1 parent fbaace7 commit d4117d7
< 8000 div class="prc-PageLayout-HorizontalDivider-CYLp5 prc-PageLayout-HeaderHorizontalDivider-bofyb" data-variant="line" style="--spacing-divider:var(--spacing-none);--spacing:var(--spacing-none)">

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

esp32/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ void mp_task(void *pvParameter) {
6565
mp_init();
6666
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
6767
mp_obj_list_init(mp_sys_path, 0);
68+
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_));
69+
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_flash_slash_lib));
6870
mp_obj_list_init(mp_sys_argv, 0);
6971
readline_init0();
7072

esp32/qstrdefsport.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@
2727
// qstrs specific to this port, only needed if they aren't auto-generated
2828

2929
// Entries for sys.path
30-
Q(/)
31-
Q(/lib)
30+
Q(/flash/lib)

0 commit comments

Comments
 (0)
0