summaryrefslogtreecommitdiffstatshomepage
path: root/stm/malloc0.c
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-10-17 22:50:21 +0100
committerDamien <damien.p.george@gmail.com>2013-10-17 22:50:21 +0100
commit4a175e1f110e0d6ad1b784054050be59a6e2c706 (patch)
treecd1a2bd2756368befd6a34360da827804bcc5720 /stm/malloc0.c
parentd2755ec538ab815561e7592b5afa6dcfcb557fbb (diff)
downloadmicropython-4a175e1f110e0d6ad1b784054050be59a6e2c706.tar.gz
micropython-4a175e1f110e0d6ad1b784054050be59a6e2c706.zip
Fix up linker script; improve startup code; printf to USB.
Diffstat (limited to 'stm/malloc0.c')
-rw-r--r--stm/malloc0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stm/malloc0.c b/stm/malloc0.c
index 55c1ae8044..1b45846e6f 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);