summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2017-05-14 10:28:39 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2017-05-14 10:28:39 +0200
commitacd3440e1b85fe102e3537d042e0ffd2f58d06a8 (patch)
tree0ba815b766a21b6614a89d773a2070102bcfeb5d
parent4796432e8d165b5358af9675f2ca15a61bafee68 (diff)
Added STM32F401 linker script.
-rw-r--r--build_rules8
-rw-r--r--ld_scripts/stm32_f401_e.ld6
2 files changed, 14 insertions, 0 deletions
diff --git a/build_rules b/build_rules
index 6137608..81547eb 100644
--- a/build_rules
+++ b/build_rules
@@ -72,6 +72,14 @@ def select_stm32(env, variant):
'c': 'stm32_f373_c.ld',
}[flash]
+ elif family in ('f401'):
+ select_arm(env, 'cortex-m4f')
+ env.Append(CPPDEFINES = ['STM32F4'])
+
+ env['LINK_SCRIPT'] = {
+ 'e': 'stm32_f401_e.ld',
+ }[flash]
+
elif family in ('f405', 'f407'):
select_arm(env, 'cortex-m4f')
env.Append(CPPDEFINES = ['STM32F4'])
diff --git a/ld_scripts/stm32_f401_e.ld b/ld_scripts/stm32_f401_e.ld
new file mode 100644
index 0000000..e5ccad6
--- /dev/null
+++ b/ld_scripts/stm32_f401_e.ld
@@ -0,0 +1,6 @@
+MEMORY {
+ flash (rx) : org = 0x08000000, len = 512k
+ ram (rwx) : org = 0x20000000, len = 96k
+}
+
+INCLUDE "arm_flash_ram.ld"