Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
95f19b45
Commit
95f19b45
authored
May 24, 2015
by
Daniel Campora
Browse files
cc3200: Remove duplicated checks for boot.py and main.py existency.
parent
90d7c4ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
cc3200/mptask.c
View file @
95f19b45
...
...
@@ -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,18 +183,14 @@ 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
);
if
(
ret
&
PYEXEC_FORCED_EXIT
)
{
goto
soft_reset_exit
;
}
if
(
!
ret
)
{
// flash the system led
mperror_signal_error
();
}
// run boot.py
int
ret
=
pyexec_file
(
"boot.py"
);
if
(
ret
&
PYEXEC_FORCED_EXIT
)
{
goto
soft_reset_exit
;
}
if
(
!
ret
)
{
// flash the system led
mperror_signal_error
();
}
}
...
...
@@ -214,16 +209,13 @@ 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
;
}
if
(
!
ret
)
{
// flash the system led
mperror_signal_error
();
}
int
ret
=
pyexec_file
(
main_py
);
if
(
ret
&
PYEXEC_FORCED_EXIT
)
{
goto
soft_reset_exit
;
}
if
(
!
ret
)
{
// flash the system led
mperror_signal_error
();
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment