mirror of
https://github.com/micropython/micropython.git
synced 2025-12-15 17:30:14 +01:00
nrf/main: Replace mp_stack_set calls with mp_cstack_init_with_top.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
#include "py/parse.h"
|
||||
#include "py/obj.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "py/gc.h"
|
||||
#include "py/compile.h"
|
||||
#include "py/persistentcode.h"
|
||||
@@ -126,11 +125,7 @@ soft_reset:
|
||||
|
||||
led_state(1, 1); // MICROPY_HW_LED_1 aka MICROPY_HW_LED_RED
|
||||
|
||||
mp_stack_set_top(&_ram_end);
|
||||
|
||||
// Stack limit should be less than real stack size, so we have a chance
|
||||
// to recover from limit hit. (Limit is measured in bytes.)
|
||||
mp_stack_set_limit((char *)&_ram_end - (char *)&_heap_end - 400);
|
||||
mp_cstack_init_with_top(&_ram_end, (char *)&_ram_end - (char *)&_heap_end);
|
||||
|
||||
machine_init();
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@
|
||||
#define MICROPY_ENABLE_GC (1)
|
||||
#define MICROPY_ENABLE_FINALISER (1)
|
||||
#define MICROPY_STACK_CHECK (1)
|
||||
#define MICROPY_STACK_CHECK_MARGIN (400)
|
||||
#define MICROPY_HELPER_REPL (1)
|
||||
#define MICROPY_REPL_INFO (1)
|
||||
#define MICROPY_REPL_AUTO_INDENT (1)
|
||||
|
||||
Reference in New Issue
Block a user