合并bacon_dev分支的修改:1.协议基本运转;2.增加make debug_hlm

This commit is contained in:
2025-02-27 12:55:34 +08:00
parent b167d3affa
commit be7adef4aa
14 changed files with 1060 additions and 291 deletions

View File

@@ -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) //13bitrocc
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