ESP32: reboot whole ESP32 at when invoking reset

This commit is contained in:
folkert van heusden 2022-04-12 22:04:26 +02:00
parent e5dd0105af
commit 439c34abab

View file

@ -135,22 +135,23 @@ void debugger(console *const cnsl, bus *const b, std::atomic_bool *const interru
continue; continue;
} }
else if (cmd == "reset" || cmd == "r") { else if (cmd == "reset" || cmd == "r") {
#if defined(ESP32)
ESP.restart();
#else
terminate = false; terminate = false;
event = 0; event = 0;
c->reset(); c->reset();
#if defined(ESP32)
setBootLoader(b);
#endif #endif
continue; continue;
} }
#if !defined(ESP32) else if (cmd == "quit" || cmd == "q") {
else if (cmd == "quit" || cmd == "q") #if defined(ESP32)
break; ESP.restart();
#endif #endif
break;
}
else if (cmd == "help" || cmd == "h" || cmd == "?") { else if (cmd == "help" || cmd == "h" || cmd == "?") {
cnsl->put_string_lf("disassemble/d - show current instruction (pc=/n=)"); cnsl->put_string_lf("disassemble/d - show current instruction (pc=/n=)");
cnsl->put_string_lf("go - run until trap or ^e"); cnsl->put_string_lf("go - run until trap or ^e");