Skip to content

Commit c16e7ea

Browse files
committed
zephyr: Implement soft reset feature.
1 parent 95fe7a4 commit c16e7ea

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

zephyr/main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ int real_main(void) {
6767
// Should be set to stack size in prj.mdef minus fuzz factor
6868
mp_stack_set_limit(3584);
6969

70+
soft_reset:
7071
#if MICROPY_ENABLE_GC
7172
gc_init(heap, heap + sizeof(heap));
7273
#endif
@@ -89,7 +90,9 @@ int real_main(void) {
8990
}
9091
}
9192

92-
mp_deinit();
93+
printf("soft reboot\n");
94+
goto soft_reset;
95+
9396
return 0;
9497
}
9598

0 commit comments

Comments
 (0)