mimxrt/main: Skip running main.py if boot.py failed.

See related #7379.
pull/7458/head
robert-hh 2021-06-16 09:06:05 +02:00 zatwierdzone przez Damien George
rodzic b35566af79
commit 4eabff53cb
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -70,7 +70,8 @@ int main(void) {
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;
}
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) {
// Do not execute main.py if boot.py failed
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL && ret != 0) {
ret = pyexec_file_if_exists("main.py");
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;