summaryrefslogtreecommitdiff
path: root/core/cortex-m/ec.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m/ec.lds.S')
-rw-r--r--core/cortex-m/ec.lds.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 115310bc28..6d858abd15 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -162,9 +162,20 @@ SECTIONS
__data_start = .;
*(.data.tasks)
*(.data)
+#ifdef CONFIG_MPU
+ /* It has to be aligned by 32 bytes to be a valid MPU region. */
+ . = ALIGN(32);
+ __iram_text_start = .;
+#else
. = ALIGN(4);
+#endif
*(.iram.text)
+#ifdef CONFIG_MPU
+ . = ALIGN(32);
+ __iram_text_end = .;
+#else
. = ALIGN(4);
+#endif
__data_end = .;
/* Shared memory buffer must be at the end of preallocated RAM, so it