File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 4848#include "py/repl.h"
4949#include "py/gc.h"
5050#include "py/mphal.h"
51- #include "py/stackctrl.h"
5251#include "shared/runtime/gchelper.h"
5352#include "shared/runtime/pyexec.h"
5453#include "shared/readline/readline.h"
@@ -129,8 +128,6 @@ static void vfs_init(void) {
129128#endif // MICROPY_VFS
130129
131130int real_main (void ) {
132- volatile int stack_dummy = 0 ;
133-
134131 #if MICROPY_PY_THREAD
135132 struct k_thread * z_thread = (struct k_thread * )k_current_get ();
136133 mp_thread_init ((void * )z_thread -> stack_info .start , z_thread -> stack_info .size / sizeof (uintptr_t ));
@@ -140,9 +137,7 @@ int real_main(void) {
140137 mp_hal_init ();
141138
142139soft_reset :
143- mp_stack_set_top ((void * )& stack_dummy );
144- // Make MicroPython's stack limit somewhat smaller than full stack available
145- mp_stack_set_limit (CONFIG_MAIN_STACK_SIZE - 512 );
140+ mp_cstack_init_with_sp_here (CONFIG_MAIN_STACK_SIZE );
146141 #if MICROPY_ENABLE_GC
147142 gc_init (heap , heap + sizeof (heap ));
148143 #endif
You can’t perform that action at this time.
0 commit comments