summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_rules9
-rw-r--r--ld_scripts/qemu.ld8
2 files changed, 17 insertions, 0 deletions
diff --git a/build_rules b/build_rules
index 935e252..0cf1fc4 100644
--- a/build_rules
+++ b/build_rules
@@ -85,12 +85,21 @@ def select_stm32(env, variant):
print 'Unknown stm32 family: %s' % family
Exit(1)
+def select_qemu(env, variant):
+ select_arm(env, 'cortex-m3')
+ env.Append(CPPDEFINES = ['QEMU'])
+
+ env['LINK_SCRIPT'] = 'qemu.ld'
+
def SelectMCU(env, mcu, variant_dir = None):
mcu = mcu.lower()
if mcu.startswith('stm32'):
select_stm32(env, mcu)
+ elif mcu.startswith('qemu'):
+ select_qemu(env, mcu)
+
else:
print 'Unknown MCU: %s' % mcu
Exit(1)
diff --git a/ld_scripts/qemu.ld b/ld_scripts/qemu.ld
new file mode 100644
index 0000000..9339a13
--- /dev/null
+++ b/ld_scripts/qemu.ld
@@ -0,0 +1,8 @@
+/* Linker script for qemu-system-arm -machine lm3s6965evb */
+
+MEMORY {
+ flash (rx) : org = 0x00000000, len = 256k
+ ram (rwx) : org = 0x20000000, len = 64k
+}
+
+INCLUDE "arm_flash_ram.ld"