mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
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();
|
||||
#endif
|
||||
|
||||
// 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_set_top(&_estack);
|
||||
mp_stack_set_limit((char *)&_estack - (char *)&_sstack - 1024);
|
||||
// Stack limit init.
|
||||
mp_cstack_init_with_top(&_estack, (char *)&_estack - (char *)&_sstack);
|
||||
|
||||
// GC init
|
||||
gc_init(MICROPY_HEAP_START, MICROPY_HEAP_END);
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t
|
||||
#endif
|
||||
#endif
|
||||
#define MICROPY_STACK_CHECK_MARGIN (1024)
|
||||
#define MICROPY_ALLOC_PATH_MAX (128)
|
||||
|
||||
// optimisations
|
||||
|
||||
Reference in New Issue
Block a user