summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2013-07-07 19:59:45 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2013-07-07 19:59:45 +0200
commitb5206743e61de16ce5acad6ef508862bc1017d96 (patch)
tree1de4e5a920137c34a2b6175156866775ef5989bd
parent06db8315c5a89ede9a6d8094f9dec73301ff1483 (diff)
Add QEMU target and linker script.
-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"