From 4a175e1f110e0d6ad1b784054050be59a6e2c706 Mon Sep 17 00:00:00 2001 From: Damien Date: Thu, 17 Oct 2013 22:50:21 +0100 Subject: Fix up linker script; improve startup code; printf to USB. --- stm/malloc0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stm/malloc0.c') diff --git a/stm/malloc0.c b/stm/malloc0.c index 55c1ae804..1b45846e6 100644 --- a/stm/malloc0.c +++ b/stm/malloc0.c @@ -5,7 +5,8 @@ static uint32_t mem = 0; void *malloc(size_t n) { if (mem == 0) { - mem = 0x20008000; // need to use big ram block so we can execute code from it; start up a bit in case that's where bss is...? + extern uint32_t _heap_start; + mem = &_heap_start; // need to use big ram block so we can execute code from it (is it true that we can't execute from CCM?) } void *ptr = (void*)mem; mem = (mem + n + 3) & (~3); -- cgit v1.2.3