summaryrefslogtreecommitdiff
path: root/Debugger/debug_stub.S
diff options
context:
space:
mode:
Diffstat (limited to 'Debugger/debug_stub.S')
-rw-r--r--Debugger/debug_stub.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S
index f40b6fb..b020a09 100644
--- a/Debugger/debug_stub.S
+++ b/Debugger/debug_stub.S
@@ -533,14 +533,13 @@ dbg__bkpt_offset_outofrange:
*
****************************************************************************/
dbg__bkpt_waitCMD:
- bl dbg__getDebugMsg /* Read new message from Debugger, message buffer length in R0, 0 if none, -1 if error */
+ bl dbg__getDebugMsg /* Read new message from Debugger, buflen in R0, 0 if none, -1 if error, msgbuf pointer in R1 */
cmp r0, #0
beq _dbg__housekeeping /* No message yet, do housekeeping tasks */
movlt r0, #MSG_ERRCHKSUM /* Message invalid, checksum error? */
blt _dbg__cmdError /* Send response to GDB server */
/* Message now has $<packet info>\0 */
- ldr r4, =debug_msgRxBufPtr
- ldr r4, [r4] /* Rx buffer Start Address */
+ mov r4, r1 /* Use R4 as buffer pointer */
ldrb r0, [r4], #1 /* Look for '$' */
teq r0, #MSGBUF_STARTCHAR
movne r0, #MSG_ERRFORMAT /* Message Format invalid (not '$') */