From 503cd98f98975ac0996dfdb39986bb7265104216 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Mon, 14 Feb 2011 11:50:09 +0800 Subject: added hooks to invoke debugger from nxt firmware comm module --- AT91SAM7S256/Source/c_comm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'AT91SAM7S256/Source/c_comm.c') diff --git a/AT91SAM7S256/Source/c_comm.c b/AT91SAM7S256/Source/c_comm.c index ee0c6ae..bebf5f3 100644 --- a/AT91SAM7S256/Source/c_comm.c +++ b/AT91SAM7S256/Source/c_comm.c @@ -26,6 +26,9 @@ #include "d_bt.h" #include #include +#ifdef __ARMDEBUG__ +#include "debug_stub.h" +#endif enum { @@ -422,6 +425,16 @@ UWORD cCommInterprete(UBYTE *pInBuf, UBYTE *pOutBuf, UBYTE *pLength, UBYTE C } break; +#ifdef __ARMDEBUG__ + case DEBUG_CMD: + { + ReturnStatus = cCommHandleDebug(&(pInBuf[0]), CmdBit, MsgLength); /* Pass everything (incl. message command byte) to function */ + /* Check that Debug Command does not expect reply */ + assert ((pInBuf[0]) & NO_REPLY_BIT); + *pLength = 0; + } + break; +#endif default: { @@ -476,7 +489,6 @@ UWORD cCommInterprete(UBYTE *pInBuf, UBYTE *pOutBuf, UBYTE *pLength, UBYTE C return(ReturnStatus); } - UWORD cCommInterpreteCmd(UBYTE Cmd, UBYTE *pInBuf, UBYTE *pOutBuf, UBYTE *pLength, UBYTE CmdBit, UWORD MsgLength) { ULONG FileLength; -- cgit v1.2.3