diff options
| author | Chris Mason <c.mason@inchipdesign.com.au> | 2019-05-15 00:43:38 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2019-06-14 15:29:24 +1000 |
| commit | 14cf91f70467aa928f3e17223f108ace0864b4fe (patch) | |
| tree | fdc70c3501e88d8c402d745923df30e243f059d9 /ports/stm32/main.c | |
| parent | 8b18cfedee441413d6b53a3d7c083a1e3a1a47e6 (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/main.c')
| -rw-r--r-- | ports/stm32/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/main.c b/ports/stm32/main.c index 44e29921b..523034e09 100644 --- a/ports/stm32/main.c +++ b/ports/stm32/main.c @@ -536,7 +536,7 @@ soft_reset: // 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*)&_heap_end - 1024); + mp_stack_set_limit((char*)&_estack - (char*)&_sstack - 1024); // GC init gc_init(MICROPY_HEAP_START, MICROPY_HEAP_END); |
