stmhal/main: Use _estack value to initialise stack extents.

This commit is contained in:
Damien George 2017-01-31 16:02:54 +11:00
parent 882ec01e42
commit 00e7176624
1 changed files with 2 additions and 2 deletions

View File

@ -508,8 +508,8 @@ soft_reset:
// Stack limit should be less than real stack size, so we have a chance
// to recover from limit hit. (Limit is measured in bytes.)
// Note: stack control relies on main thread being initialised above
mp_stack_ctrl_init();
mp_stack_set_limit((char*)&_ram_end - (char*)&_heap_end - 1024);
mp_stack_set_top(&_estack);
mp_stack_set_limit((char*)&_estack - (char*)&_heap_end - 1024);
// GC init
gc_init(&_heap_start, &_heap_end);