From b5206743e61de16ce5acad6ef508862bc1017d96 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 7 Jul 2013 19:59:45 +0200 Subject: Add QEMU target and linker script. --- build_rules | 9 +++++++++ ld_scripts/qemu.ld | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 ld_scripts/qemu.ld 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" -- cgit v1.2.3