diff options
-rw-r--r-- | py/runtime.c | 3 | ||||
-rw-r--r-- | stmhal/main.c | 1 | ||||
-rw-r--r-- | unix/main.c | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/py/runtime.c b/py/runtime.c index b539984c0b..f08ff9ff40 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -45,6 +45,7 @@ #include "smallint.h" #include "objgenerator.h" #include "lexer.h" +#include "stackctrl.h" #if 0 // print debugging info #define DEBUG_PRINT (1) @@ -69,6 +70,8 @@ const mp_obj_module_t mp_module___main__ = { }; void mp_init(void) { + stack_ctrl_init(); + // call port specific initialization if any #ifdef MICROPY_PORT_INIT_FUNC MICROPY_PORT_INIT_FUNC; diff --git a/stmhal/main.c b/stmhal/main.c index 4e50daba41..9f48fbfd65 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -187,7 +187,6 @@ static const char fresh_readme_txt[] = int main(void) { // TODO disable JTAG - stack_ctrl_init(); // Stack limit should be less than real stack size, so we // had chance to recover from limit hit. stack_set_limit(&_ram_end - &_heap_end - 512); diff --git a/unix/main.c b/unix/main.c index a08661339c..23615aa988 100644 --- a/unix/main.c +++ b/unix/main.c @@ -265,7 +265,6 @@ void pre_process_options(int argc, char **argv) { #endif int main(int argc, char **argv) { - stack_ctrl_init(); stack_set_limit(32768); pre_process_options(argc, argv); |