summaryrefslogtreecommitdiff
path: root/bsp/env/freedom-e300-arty
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2016-12-09 17:29:16 -0800
committerGitHub <noreply@github.com>2016-12-09 17:29:16 -0800
commit7b9f876e2584e277accb2f38488fc0cfadcb6387 (patch)
tree81fc4b0ef94dfa74c0db3a09d383dded5f9ab53b /bsp/env/freedom-e300-arty
parent7011ca48a2ef9205184a03a854ba310ebcda0e40 (diff)
parenta68a562a49da111ff722a1651dd6f74604d3247b (diff)
Merge pull request #20 from sifive/trap_entry
demo_gpio: Correct trap_entry handling to enable timer/ext interrupts
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