File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -515,11 +515,8 @@ void stm32_main(uint32_t reset_mode) {
515515 mp_thread_init ();
516516 #endif
517517
518- // Stack limit should be less than real stack size, so we have a chance
519- // to recover from limit hit. (Limit is measured in bytes.)
520- // Note: stack control relies on main thread being initialised above
521- mp_stack_set_top (& _estack );
522- mp_stack_set_limit ((char * )& _estack - (char * )& _sstack - 1024 );
518+ // Stack limit init.
519+ mp_cstack_init_with_top (& _estack , (char * )& _estack - (char * )& _sstack );
523520
524521 // GC init
525522 gc_init (MICROPY_HEAP_START , MICROPY_HEAP_END );
Original file line number Diff line number Diff line change 4343#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t
4444#endif
4545#endif
46+ #define MICROPY_STACK_CHECK_MARGIN (1024)
4647#define MICROPY_ALLOC_PATH_MAX (128)
4748
4849// optimisations
You can’t perform that action at this time.
0 commit comments