summaryrefslogtreecommitdiff
path: root/bsp/env/freedom-e300-arty
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/env/freedom-e300-arty')
-rw-r--r--bsp/env/freedom-e300-arty/init.c5
l---------bsp/env/freedom-e300-arty/start.S1
2 files changed, 4 insertions, 2 deletions
diff --git a/bsp/env/freedom-e300-arty/init.c b/bsp/env/freedom-e300-arty/init.c
index 36272f7..37e9725 100644
--- a/bsp/env/freedom-e300-arty/init.c
+++ b/bsp/env/freedom-e300-arty/init.c
@@ -5,6 +5,7 @@
#include "encoding.h"
extern int main(int argc, char** argv);
+extern void trap_entry();
uint32_t get_cpu_freq()
{
@@ -43,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;
@@ -55,7 +56,7 @@ void _init()
printf("core freq at %d Hz\n", get_cpu_freq());
- write_csr(mtvec, &handle_trap);
+ write_csr(mtvec, &trap_entry);
_exit(main(0, NULL));
}
diff --git a/bsp/env/freedom-e300-arty/start.S b/bsp/env/freedom-e300-arty/start.S
new file mode 120000
index 0000000..028e9bf
--- /dev/null
+++ b/bsp/env/freedom-e300-arty/start.S
@@ -0,0 +1 @@
+../freedom-e300-hifive1/start.S \ No newline at end of file