Browse Source

cc3200: Remove duplicated checks for boot.py and main.py existency.

pull/1288/head
Daniel Campora 10 years ago
parent
commit
95f19b4542
  1. 12
      cc3200/mptask.c

12
cc3200/mptask.c

@ -105,7 +105,6 @@ void TASK_Micropython (void *pvParameters) {
uint32_t sp = gc_helper_get_sp();
gc_collect_init (sp);
bool safeboot = false;
FRESULT res;
mptask_pre_init();
@ -184,11 +183,8 @@ soft_reset:
MP_STATE_PORT(pyb_config_main) = MP_OBJ_NULL;
if (!safeboot) {
// run boot.py, if it exists
const char *boot_py = "boot.py";
res = f_stat(boot_py, NULL);
if (res == FR_OK) {
int ret = pyexec_file(boot_py);
// run boot.py
int ret = pyexec_file("boot.py");
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;
}
@ -197,7 +193,6 @@ soft_reset:
mperror_signal_error();
}
}
}
// now we initialise sub-systems that need configuration from boot.py,
// or whose initialisation can be safely deferred until after running
@ -214,8 +209,6 @@ soft_reset:
} else {
main_py = mp_obj_str_get_str(MP_STATE_PORT(pyb_config_main));
}
res = f_stat(main_py, NULL);
if (res == FR_OK) {
int ret = pyexec_file(main_py);
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;
@ -226,7 +219,6 @@ soft_reset:
}
}
}
}
// main script is finished, so now go into REPL mode.
// the REPL mode can change, or it can request a soft reset.

Loading…
Cancel
Save