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.
This commit is contained in:
Chris Mason
2019-05-15 00:43:38 +10:00
committed by Damien George
parent 8b18cfedee
commit 14cf91f704
26 changed files with 92 additions and 86 deletions

View File

@@ -181,7 +181,7 @@ void HardFault_C_Handler(ExceptionRegisters_t *regs) {
if ((void*)&_ram_start <= (void*)regs && (void*)regs < (void*)&_ram_end) {
mp_hal_stdout_tx_str("Stack:\r\n");
uint32_t *stack_top = &_estack;
if ((void*)regs < (void*)&_heap_end) {
if ((void*)regs < (void*)&_sstack) {
// stack not in static stack area so limit the amount we print
stack_top = (uint32_t*)regs + 32;
}