summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-15 01:10:08 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-15 01:10:08 +0300
commitc16e7eae5ed0d6611d82370a693fb33b31455c39 (patch)
treedb2f519dde55b4b5f9b6f184016cdea54629e655
parent95fe7a40b3962440b67ad0f187e3e9400bf0c642 (diff)
downloadmicropython-c16e7eae5ed0d6611d82370a693fb33b31455c39.tar.gz
micropython-c16e7eae5ed0d6611d82370a693fb33b31455c39.zip
zephyr: Implement soft reset feature.
-rw-r--r--zephyr/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/zephyr/main.c b/zephyr/main.c
index f8e48e61e8..250e51a2f5 100644
--- a/zephyr/main.c
+++ b/zephyr/main.c
@@ -67,6 +67,7 @@ int real_main(void) {
// Should be set to stack size in prj.mdef minus fuzz factor
mp_stack_set_limit(3584);
+soft_reset:
#if MICROPY_ENABLE_GC
gc_init(heap, heap + sizeof(heap));
#endif
@@ -89,7 +90,9 @@ int real_main(void) {
}
}
- mp_deinit();
+ printf("soft reboot\n");
+ goto soft_reset;
+
return 0;
}