summaryrefslogtreecommitdiff
path: root/ports/stm32/pybthread.c
diff options
context:
space:
mode:
authorChris Mason <c.mason@inchipdesign.com.au>2019-05-15 00:43:38 +1000
committerDamien George <damien.p.george@gmail.com>2019-06-14 15:29:24 +1000
commit14cf91f70467aa928f3e17223f108ace0864b4fe (patch)
treefdc70c3501e88d8c402d745923df30e243f059d9 /ports/stm32/pybthread.c
parent8b18cfedee441413d6b53a3d7c083a1e3a1a47e6 (diff)
stm32: In link script, define start of stack separately from heap end.
Previously the end of the heap was the start (lowest address) of the stack. With the changes in this commit these addresses are now independent, allowing a board to place the heap and stack in separate locations.
Diffstat (limited to 'ports/stm32/pybthread.c')
-rw-r--r--ports/stm32/pybthread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/pybthread.c b/ports/stm32/pybthread.c
index 6baf88f66..d6e9a3f51 100644
--- a/ports/stm32/pybthread.c
+++ b/ports/stm32/pybthread.c
@@ -70,8 +70,8 @@ void pyb_thread_init(pyb_thread_t *thread) {
thread->sp = NULL; // will be set when this thread switches out
thread->local_state = 0; // will be set by mp_thread_init
thread->arg = NULL;
- thread->stack = &_heap_end;
- thread->stack_len = ((uint32_t)&_estack - (uint32_t)&_heap_end) / sizeof(uint32_t);
+ thread->stack = &_sstack;
+ thread->stack_len = ((uint32_t)&_estack - (uint32_t)&_sstack) / sizeof(uint32_t);
thread->all_next = NULL;
thread->run_prev = thread;
thread->run_next = thread;