aboutsummaryrefslogtreecommitdiff
path: root/Debugger/debug_comm.S
diff options
context:
space:
mode:
Diffstat (limited to 'Debugger/debug_comm.S')
-rw-r--r--Debugger/debug_comm.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S
index 7bb150f..70499e1 100644
--- a/Debugger/debug_comm.S
+++ b/Debugger/debug_comm.S
@@ -398,6 +398,17 @@ _hasMsg2Copy:
beq exit_dbg__getDebugMsg /* Valid length, return */
exit_dbg__getMsgError:
+ /* We must first clear the existing message checksum */
+ ldr r1, =debug_msgTxBufPtr /* R5: data structure base pointer */
+ ldr r1, [r1] /* Tx buffer Start Address */
+
+1: ldrb r0, [r1], #1
+ teq r0, #MSGBUF_CHKSUMCHAR
+ bne 1b
+
+ mov r0, #0 /* ASCIIZ */
+ strb r0, [r1, #-1] /* Pointer R1 is now one past the MSGBUF_CHKSUMCHAR */
+
bl dbg__putDebugMsg /* Retransmit message */
mov r0, #0 /* Flag no message received */
#if 0