summaryrefslogtreecommitdiff
path: root/bsp/env
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/env')
-rw-r--r--bsp/env/freedom-e300-arty/init.c2
-rw-r--r--bsp/env/hifive1.h6
2 files changed, 3 insertions, 5 deletions
diff --git a/bsp/env/freedom-e300-arty/init.c b/bsp/env/freedom-e300-arty/init.c
index 4313808..37e9725 100644
--- a/bsp/env/freedom-e300-arty/init.c
+++ b/bsp/env/freedom-e300-arty/init.c
@@ -44,7 +44,7 @@ uintptr_t handle_trap(uintptr_t mcause, uintptr_t epc)
#endif
}
else {
- write(1, "trap\n", 5);
+ write(1, "Unhandled Trap:\n", 16);
_exit(1 + mcause);
}
return epc;
diff --git a/bsp/env/hifive1.h b/bsp/env/hifive1.h
index f6bef9f..11b98f8 100644
--- a/bsp/env/hifive1.h
+++ b/bsp/env/hifive1.h
@@ -66,16 +66,14 @@
#define BUTTON_2_OFFSET 31
#define INT_DEVICE_BUTTON_0 (INT_GPIO_BASE + BUTTON_0_OFFSET)
-#define INT_DEVICE_BUTTON_1 (INT_GPIO_BASE + BUTTON_0_OFFSET)
-#define INT_DEVICE_BUTTON_2 (INT_GPIO_BASE + BUTTON_0_OFFSET)
+#define INT_DEVICE_BUTTON_1 (INT_GPIO_BASE + BUTTON_1_OFFSET)
+#define INT_DEVICE_BUTTON_2 (INT_GPIO_BASE + BUTTON_2_OFFSET)
#endif
#define HAS_HFXOSC 1
#define HAS_LFROSC_BYPASS 1
-
-
void write_hex(int fd, uint32_t hex);
#endif /* _SIFIVE_HIFIVE1_H */