aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/ports/ARMCMx/compilers/GCC/rules.ld
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/ports/ARMCMx/compilers/GCC/rules.ld')
-rw-r--r--os/common/ports/ARMCMx/compilers/GCC/rules.ld14
1 files changed, 9 insertions, 5 deletions
diff --git a/os/common/ports/ARMCMx/compilers/GCC/rules.ld b/os/common/ports/ARMCMx/compilers/GCC/rules.ld
index 0ecb156cc..70c0bc3cd 100644
--- a/os/common/ports/ARMCMx/compilers/GCC/rules.ld
+++ b/os/common/ports/ARMCMx/compilers/GCC/rules.ld
@@ -224,9 +224,13 @@ SECTIONS
. = ALIGN(4);
__ram7_free__ = .;
} > ram7
-}
-/* Heap default boundaries, it is defaulted to be the non-used part
- of ram0 region.*/
-__heap_base__ = __ram0_free__;
-__heap_end__ = __ram0_end__;
+ /* The default heap uses the (statically) unused part of a RAM section.*/
+ .heap (NOLOAD) :
+ {
+ . = ALIGN(8);
+ __heap_base__ = .;
+ . = ORIGIN(HEAP_RAM) + LENGTH(HEAP_RAM);
+ __heap_end__ = .;
+ } > HEAP_RAM
+}