summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"