summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@chickadee.tech>2016-09-22 13:56:26 -0700
committerScott Shawcroft <scott@chickadee.tech>2016-09-22 13:56:26 -0700
commitbbeed82378b417dc92507985286ce3a10c8e7036 (patch)
treec6dd6a7a7aa15e2067de5e9ca3a46f23783607cd
parente56948650f7e2d631063339c92563f34961c08eb (diff)
atmel-samd: Run boot.py and main.py at startup and soft reboot.
-rw-r--r--atmel-samd/main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/atmel-samd/main.c b/atmel-samd/main.c
index fa9838c7a..21305d8d7 100644
--- a/atmel-samd/main.c
+++ b/atmel-samd/main.c
@@ -173,6 +173,9 @@ void reset_mp() {
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
pin_init0();
+
+ pyexec_file("boot.py");
+ pyexec_file("main.py");
}
int main(int argc, char **argv) {
@@ -189,15 +192,6 @@ int main(int argc, char **argv) {
int stack_dummy;
reset_mp();
- #if MICROPY_REPL_EVENT_DRIVEN
- pyexec_event_repl_init();
- for (;;) {
- int c = mp_hal_stdin_rx_chr();
- if (pyexec_event_repl_process_char(c)) {
- break;
- }
- }
- #else
// Main script is finished, so now go into REPL mode.
// The REPL mode can change, or it can request a soft reset.
int exit_code = 0;
@@ -215,7 +209,6 @@ int main(int argc, char **argv) {
break;
}
}
- #endif
mp_deinit();
return 0;
}