From 517c98db287a2f66ef0df365b4a3c054e9c87cba Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 16 Jun 2011 15:36:28 +0800 Subject: fix condition check in _dbg__sendCommMsg due to c vs. armdebug encoding True is encoded as #1 by C Compiler, while ARMDEBUG uses #0xFFFFFFFF. Changed logic test to avoid this problem. --- Debugger/debug_comm.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S index d0ea045..a3600a2 100644 --- a/Debugger/debug_comm.S +++ b/Debugger/debug_comm.S @@ -408,9 +408,11 @@ _dbg__sendCommMsg: mov r4, r0 /* Keep Comm Buffer length in R4 */ #ifdef __NXOS__ /* Check USB bus status, transmit message if possible */ - bl nx_usb_is_connected /* R0 = True if USB is ready */ - cmp r0, #TRUE - bne _exit_dbg__sendCommMsg + bl nx_usb_is_connected /* R0 = TRUE (#1) if USB is ready */ + teq r0, #0 /* FALSE == #0; + We can't check for True condition since values + used by C-Compiler & ARMDEBUG are different */ + beq _dbg__sendCommMsgFailed /* Actual transmission (blocking) */ ldr r0, =debug_OutCommBuf /* data pointer parameter */ -- cgit v1.2.3