aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debug/programs/regs.S2
-rw-r--r--debug/targets.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/debug/programs/regs.S b/debug/programs/regs.S
index 5c4f462..200184d 100644
--- a/debug/programs/regs.S
+++ b/debug/programs/regs.S
@@ -1,4 +1,4 @@
-#if __riscv_xlen == 64
+#if XLEN == 64
# define LREG ld
# define SREG sd
# define REGBYTES 8
diff --git a/debug/targets.py b/debug/targets.py
index d1ba964..8c725c4 100644
--- a/debug/targets.py
+++ b/debug/targets.py
@@ -49,6 +49,7 @@ class Target(object):
"-T", "targets/%s/link.lds" % (self.directory or self.name),
"-nostartfiles",
"-mcmodel=medany",
+ "-DXLEN=%d" % self.xlen,
"-o", binary_name),
xlen=self.xlen)
return binary_name