summaryrefslogtreecommitdiff
path: root/AT91SAM7S256
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-21 07:46:00 +0800
committerTat-Chee Wan (USM)2011-03-21 07:46:00 +0800
commit1748e17b2672669b41da5d34fdcca44f1e90d6b1 (patch)
tree47801fd25697648a370c036b28f809e90ae95501 /AT91SAM7S256
parentdc8b6097f61bc2b3ddd76846e1260c06688d49ee (diff)
parentddba1024fea043b728c9798270fc70c37608592a (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.S13
1 files changed, 8 insertions, 5 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.S b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
index ba6bf28..c9b9ad7 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.S
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.S
@@ -426,10 +426,11 @@ debug_armComplexCCTable:
cCommHandleDebug:
/* Arg Registers are not preserved since this is invoked explicitly */
/* push {r1-r3} */ /* store arg registers */
- bl dbg__copyNxtDebugMsg /* setup Debugger Message Buffers, validate input, CPSR returned in R0 */
+ bl dbg__copyNxtDebugMsg /* setup Debugger Message Buffers, validate input, CPSR returned in R0 */
/* pop {r1-r3} */ /* restore values */
- _dbg_getmode r0 /* Get Debug Mode */
- cmp r0, #TRUE
+ _dbg_getmode r0 /* Get Debug Mode */
+ ldr r1, =TRUE /* Thumb mode can't accept direct constant */
+ cmp r0, r1
/* If Debug Mode is TRUE, this means that we're already running the Debugger */
beq _cCommHandleDebug_cont
@@ -438,6 +439,8 @@ cCommHandleDebug:
_cCommHandleDebug_cont:
mov r0, #0 /* FIXME: Return Status */
bx lr
+
+ .ltorg
#endif
/****************************************************************************
@@ -866,7 +869,7 @@ _dbg__cmd_ReadMem:
mov r0, r1 /* move buffer pointer to R0 for subsequent processing */
bl ascii2halfword /* convert ASCII length to Hex (in R0), R1 has address of next buffer char */
cmp r0, #CMD_MEM_MAXREADBYTES /* Don't overflow our buffer (2 x CMD_MEM_MAXREADBYTES) */
- bhi __dbg__procCmdReturnOutLengthError /* Requested Length greater than buffer size, return error */
+ bhi __dbg__procCmdReturnOutputLengthError /* Requested Length greater than buffer size, return error */
mov r4, r0 /* Keep numbytes in R4 */
/* FIXME: Should validate the address? */
@@ -904,7 +907,7 @@ _dbg__cmd_WriteMem:
cmp r0, r4, asr #1 /* is Number of bytes to write == (number of ASCII Hex Chars / 2)? */
bne __dbg__procCmdParamError /* Number of bytes does not match argument length */
cmp r0, #CMD_MEM_MAXWRITEBYTES /* Don't overflow our buffer (2 x CMD_MEM_MAXWRITEBYTES) */
- bhi __dbg__procCmdReturnInLengthError /* Requested Length greater than buffer size, return error */
+ bhi __dbg__procCmdReturnInputLengthError /* Requested Length greater than buffer size, return error */
moveq r4, r0 /* Keep numbytes in R4 */
/* FIXME: Should validate the address? */
_check_msgargument r1