aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2017-04-14 10:24:32 -0700
committerMegan Wachs <megan@sifive.com>2017-04-14 10:24:32 -0700
commit584af13876fc0a9d2225df376059b627ed5e56d7 (patch)
tree19f428d46d2c741a8bda0b5e89ecfc54f1340db5 /debug/testlib.py
parent69b1dda5d9b184ff39d4e9c134f66a5bfe5bcef6 (diff)
downloadriscv-tests-584af13876fc0a9d2225df376059b627ed5e56d7.zip
riscv-tests-584af13876fc0a9d2225df376059b627ed5e56d7.tar.gz
riscv-tests-584af13876fc0a9d2225df376059b627ed5e56d7.tar.bz2
debug: checkpoint of trying to get simulation tests working
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 5a5d6e3..b0a625b 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -19,8 +19,11 @@ def find_file(path):
return None
def compile(args, xlen=32): # pylint: disable=redefined-builtin
- cc = os.path.expandvars("$RISCV/bin/riscv%d-unknown-elf-gcc" % xlen)
+ cc = os.path.expandvars("$RISCV/bin/riscv64-unknown-elf-gcc")
cmd = [cc, "-g"]
+ if (xlen == 32):
+ cmd.append("-march=rv32imac")
+ cmd.append("-mabi=ilp32")
for arg in args:
found = find_file(arg)
if found:
@@ -28,7 +31,7 @@ def compile(args, xlen=32): # pylint: disable=redefined-builtin
else:
cmd.append(arg)
process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
if process.returncode:
print