summaryrefslogtreecommitdiff
path: root/core/cortex-m0/ec.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m0/ec.lds.S')
-rw-r--r--core/cortex-m0/ec.lds.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S
index ce4ef3849d..ce1bcdbc70 100644
--- a/core/cortex-m0/ec.lds.S
+++ b/core/cortex-m0/ec.lds.S
@@ -30,6 +30,12 @@ MEMORY
ORIGIN = CONFIG_USB_RAM_BASE, \
LENGTH = CONFIG_USB_RAM_SIZE * CONFIG_USB_RAM_ACCESS_SIZE / 2
#endif
+#ifdef CONFIG_CHIP_MEMORY_REGIONS
+#define REGION(name, attr, start, size) \
+ name(attr) : ORIGIN = (start), LENGTH = (size)
+#include "memory_regions.inc"
+#undef REGION
+#endif /* CONFIG_MEMORY_REGIONS */
}
SECTIONS
{
@@ -248,6 +254,16 @@ SECTIONS
*(.usb_ram.data)
} > USB_RAM
#endif
+#ifdef CONFIG_CHIP_MEMORY_REGIONS
+#define REGION(name, attr, start, size) \
+ .name(NOLOAD) : { \
+ __##name##_start = .; \
+ *(SORT(.name.*)) \
+ } > name
+#include "memory_regions.inc"
+#undef REGION
+#endif /* CONFIG_CHIP_MEMORY_REGIONS */
+
#if !(defined(SECTION_IS_RO) && defined(CONFIG_FLASH))
/DISCARD/ : {
*(.google)