summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaureen Helm <maureen.helm@nxp.com>2020-03-10 16:03:10 -0500
committerMaureen Helm <maureen.helm@nxp.com>2020-03-11 08:30:42 -0500
commit110a610f70d1223557e5c770c84fe509c6064cfb (patch)
tree1492464cf4350aaa045130a62093a26c97f784dc
parent78c7e4a8595013b7c8f5f47823b7db12837ecaa5 (diff)
zephyr: Execute main.py file if it exists.
Adds support in the zephyr port to execute main.py if the file system is enabled and the file exists. Existing support for executing a main.py frozen module is preserved, since pyexec_file_if_exists() works just like pyexec_frozen_module() if there's no vfs.
-rw-r--r--ports/zephyr/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/zephyr/main.c b/ports/zephyr/main.c
index e0e50196b..c8f9601c3 100644
--- a/ports/zephyr/main.c
+++ b/ports/zephyr/main.c
@@ -145,8 +145,8 @@ soft_reset:
vfs_init();
#endif
- #if MICROPY_MODULE_FROZEN
- pyexec_frozen_module("main.py");
+ #if MICROPY_MODULE_FROZEN || MICROPY_VFS
+ pyexec_file_if_exists("main.py");
#endif
for (;;) {