Don't clear triggers during execution.
authorTim Newsome <tim@sifive.com>
Mon, 3 Jul 2017 17:36:03 +0000 (10:36 -0700)
committerTim Newsome <tim@sifive.com>
Mon, 3 Jul 2017 17:36:03 +0000 (10:36 -0700)
This shouldn't affect triggers set by the debugger, because running code
can't change those. When it does affect them, it breaks Hwbp1 which sets
the breakpoint before running the program.

debug/programs/entry.S

index ff8ae3092a517ad20ce2860b7b56ac2d1cd05b5a..302d409c55bb3d297c5fc8a1dc5019d27b83f82d 100755 (executable)
@@ -64,15 +64,6 @@ handle_reset:
   # initialize stack pointer
   la sp, stack_top
 
-  # Clear all hardware triggers
-  li    t0, ~0
-1:
-  addi  t0, t0, 1
-  csrw  CSR_TSELECT, t0
-  csrw  CSR_TDATA1, zero
-  csrr  t1, CSR_TSELECT
-  beq   t0, t1, 1b
-
   # perform the rest of initialization in C
   j _init