Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Jan 29, 2021
1 parent 58197f4 commit cf475ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/eez/mp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ void oneIter() {
getBaseFileName(g_scriptPath, scriptName, sizeof(scriptName));
InfoTrace("Script started: %s\n", scriptName);

#if 0
#if 1
// this version reinitialise MP every time

volatile char dummy;
mp_stack_set_top((void *)&dummy);
gc_init(g_scriptSource + MAX_SCRIPT_LENGTH, MP_BUFFER + MP_BUFFER_SIZE - MAX_SCRIPT_LENGTH);
Expand All @@ -207,8 +208,9 @@ void oneIter() {
mp_deinit();
#endif

#if 1
#if 0
// this version doesn't reinitialise MP every time

static bool g_initialized = false;
if (!g_initialized) {
volatile char dummy;
Expand All @@ -232,7 +234,6 @@ void oneIter() {
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)nlr.ret_val);
onUncaughtScriptExceptionHook();
}

#endif

psu::gui::hideAsyncOperationInProgress();
Expand Down

0 comments on commit cf475ca

Please sign in to comment.