stm32/main: Replace mp_stack_set calls with new mp_cstack_init_with_top.
Required in MICROPY_PREVIEW_VERSION_2. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
This commit is contained in:
committed by
Damien George
parent
569d472bc7
commit
d6c673f28f
@@ -515,11 +515,8 @@ soft_reset:
|
|||||||
mp_thread_init();
|
mp_thread_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Stack limit should be less than real stack size, so we have a chance
|
// Stack limit init.
|
||||||
// to recover from limit hit. (Limit is measured in bytes.)
|
mp_cstack_init_with_top(&_estack, (char *)&_estack - (char *)&_sstack);
|
||||||
// Note: stack control relies on main thread being initialised above
|
|
||||||
mp_stack_set_top(&_estack);
|
|
||||||
mp_stack_set_limit((char *)&_estack - (char *)&_sstack - 1024);
|
|
||||||
|
|
||||||
// GC init
|
// GC init
|
||||||
gc_init(MICROPY_HEAP_START, MICROPY_HEAP_END);
|
gc_init(MICROPY_HEAP_START, MICROPY_HEAP_END);
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t
|
#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#define MICROPY_STACK_CHECK_MARGIN (1024)
|
||||||
#define MICROPY_ALLOC_PATH_MAX (128)
|
#define MICROPY_ALLOC_PATH_MAX (128)
|
||||||
|
|
||||||
// optimisations
|
// optimisations
|
||||||
|
|||||||
Reference in New Issue
Block a user