diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-10-25 22:41:26 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-10-25 22:41:26 -0400 |
| commit | 76817eaa105f81896c9c51ca5735bdec8e3424b4 (patch) | |
| tree | 6dfcfe8b2b61a989c01d351b3d9122a9d814d2da /supervisor/shared/stack.c | |
| parent | aa1eed3bd3911bb4504feda9d1d28bcd0928137d (diff) | |
| parent | 3683ee3ffa5b6da2574e1618b539b68cbc7e8db5 (diff) | |
Merge remote-tracking branch 'adafruit/master' into nano-33-ble
Diffstat (limited to 'supervisor/shared/stack.c')
| -rwxr-xr-x | supervisor/shared/stack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/supervisor/shared/stack.c b/supervisor/shared/stack.c index 311fa31b2..dcecf2067 100755 --- a/supervisor/shared/stack.c +++ b/supervisor/shared/stack.c @@ -29,6 +29,7 @@ #include "py/mpconfig.h" #include "py/runtime.h" #include "supervisor/cpu.h" +#include "supervisor/port.h" #include "supervisor/shared/safe_mode.h" extern uint32_t _estack; @@ -43,7 +44,7 @@ void allocate_stack(void) { mp_uint_t regs[10]; mp_uint_t sp = cpu_get_regs_and_sp(regs); - mp_uint_t c_size = (uint32_t) &_estack - sp; + mp_uint_t c_size = (uint32_t) port_stack_get_top() - sp; stack_alloc = allocate_memory(c_size + next_stack_size + EXCEPTION_STACK_SIZE, true); if (stack_alloc == NULL) { |
