合并bacon_dev分支的修改:1.协议基本运转;2.增加make debug_hlm
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "tl2cdr.h"
|
||||
#include "system_cfg.h"
|
||||
|
||||
.extern main
|
||||
|
||||
@@ -50,7 +51,10 @@ _prog_start:
|
||||
li x31, 0
|
||||
#endif
|
||||
|
||||
li sp, 0x40011000
|
||||
//li sp, 0x40011000
|
||||
li t0, STACK_SIZE
|
||||
la sp, sys_stack
|
||||
add sp, sp, t0
|
||||
|
||||
#ifdef __riscv_i
|
||||
la t0, trap_entry
|
||||
@@ -66,7 +70,7 @@ _prog_start:
|
||||
mv t0, a0 #这里选择不同的trap_entry服务函数,这个是RV32I的代码
|
||||
#endif
|
||||
csrw mtvec, t0
|
||||
li t0, 1 << 11
|
||||
li t0, (1 << 11) //| (1 << 13) //13bit是rocc的中断
|
||||
csrw mie, t0
|
||||
|
||||
csrr t0, mstatus
|
||||
@@ -124,8 +128,9 @@ opt_trap_entry:
|
||||
#sw t6,124(sp)
|
||||
|
||||
csrr t2, mcause
|
||||
li s0, 0x80000000
|
||||
and s0, t2, s0
|
||||
//li s0, 0x80000000
|
||||
//and s0, t2, s0
|
||||
srli s0, t2, 31
|
||||
1: beqz s0, 1b #这个是异常,死循环查问题吧
|
||||
andi s0, t2, 0xf
|
||||
la t2, isr_j_table
|
||||
@@ -161,6 +166,10 @@ exti_isr:
|
||||
#lw sp,8(sp)
|
||||
#lw gp,12(sp)
|
||||
#lw tp,16(sp)
|
||||
rocc_isr:
|
||||
//add rocc interrupt here
|
||||
i_hlm_read_intflag(t0)
|
||||
i_hlm_clear_intflag(t0)
|
||||
|
||||
exit_isr:
|
||||
lw t0,20(sp)
|
||||
@@ -209,7 +218,7 @@ isr_j_table:
|
||||
1: j 1b # a jump to unknown_isr
|
||||
j exti_isr # b jump to exti_isr
|
||||
1: j 1b # c jump to unknown_isr
|
||||
1: j 1b # d jump to unknown_isr
|
||||
j rocc_isr # d jump to unknown_isr
|
||||
1: j 1b # e jump to unknown_isr
|
||||
1: j 1b # f jump to unknown_isr
|
||||
#endif
|
||||
Reference in New Issue
Block a user