aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug
diff options
context:
space:
mode:
authorTC Wan2011-01-10 11:15:07 +0800
committerTC Wan2011-01-10 11:15:07 +0800
commit067403060e4310a730b4ca19cf06aeb101d17af2 (patch)
treec524ae39fd4bdcad56674b1079af422412f1e91f /AT91SAM7S256/armdebug
parent8a0b32cabdf541450c2c0ffbff67879c392e5295 (diff)
parent04bcd43cc867d17c413ece244c1eb28390c6b487 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_comm.S2
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.h1
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_test.S50
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_test.h35
4 files changed, 86 insertions, 2 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_comm.S b/AT91SAM7S256/armdebug/Debugger/debug_comm.S
index 480b1bd..75f90ff 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_comm.S
+++ b/AT91SAM7S256/armdebug/Debugger/debug_comm.S
@@ -43,7 +43,7 @@ debug_segmentTxNum: /* Current Tx Segment Number */
.align 4
nxt_usbcmd_header:
- .byte USB_NXT_TELEGRAM_RESP, USB_NXT_RESPONSE_GDB, 0x00, 0x00 /* padded to 4 bytes */
+ .byte USB_NXT_TELEGRAM_RESP, 0x00, 0x00 /* padded to 3 bytes */
hex2char_lut:
.ascii "0123456789ABCDEF"
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.h b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
index efaed73..8e51cfd 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.h
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
@@ -42,7 +42,6 @@
#define USB_NXT_SEGNUM_OFFSET 1
#define USB_NXT_TELEGRAMSIZE_OFFSET 2
-#define USB_NXT_TELEGRAM_DC_RESP 0x8d
#define USB_NXT_TELEGRAM_RESP 0x8d
#define USB_GDBMSG_START 3 /* Offset into USB Telegram buffer */
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_test.S b/AT91SAM7S256/armdebug/Debugger/debug_test.S
new file mode 100644
index 0000000..46c7e03
--- /dev/null
+++ b/AT91SAM7S256/armdebug/Debugger/debug_test.S
@@ -0,0 +1,50 @@
+/** @file debug_test.S
+ * @brief Test Routines to trigger ARM and Thumb Manual Breakpoints
+ *
+ */
+
+/* Copyright (C) 2007-2011 the NxOS developers
+ *
+ * Module Developed by: TC Wan <tcwan@cs.usm.my>
+ *
+ * See AUTHORS for a full list of the developers.
+ *
+ * See COPYING for redistribution license
+ *
+ */
+#define __ASSEMBLY__
+#include "debug_stub.h"
+
+.text
+.align 4
+.code 32
+
+/**********************************************
+ * dbg__test_arm_bkpt Test Routine
+ *
+ */
+ .global dbg__test_arm_bkpt
+dbg__test_arm_bkpt:
+ stmfd sp!,{lr}
+ dbg__bkpt_arm /* Trigger ARM Manual Breakpoint */
+ ldmfd sp!,{pc}
+
+/**********************************************
+ * dbg__test_thumb_bkpt Test Routine
+ *
+ */
+ .global dbg__test_thumb_bkpt
+dbg__test_thumb_bkpt:
+ stmfd sp!,{lr}
+ ldr r0, =_thumb_entry
+ orr r0, r0, #1 /* set Thumb mode */
+ mov lr, pc
+ bx r0
+ ldmfd sp!,{pc}
+
+.code 16
+_thumb_entry:
+ dbg__bkpt_thumb
+ bx lr
+
+.end
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_test.h b/AT91SAM7S256/armdebug/Debugger/debug_test.h
new file mode 100644
index 0000000..6680f58
--- /dev/null
+++ b/AT91SAM7S256/armdebug/Debugger/debug_test.h
@@ -0,0 +1,35 @@
+/** @file debug_test.h
+ * @brief C header file for debugger test routines
+ *
+ */
+
+/* Copyright (C) 2007-2010 the NxOS developers
+ *
+ * Module Developed by: TC Wan <tcwan@cs.usm.my>
+ *
+ * See AUTHORS for a full list of the developers.
+ *
+ * See COPYING for redistribution license
+ *
+ */
+
+#ifndef __DEBUG_TEST_H__
+#define __DEBUG_TEST_H__
+
+#include "_c_arm_macros.h"
+
+#ifndef __ASSEMBLY__
+
+/* Define C stuff */
+/** @defgroup debug_public */
+/*@{*/
+
+FUNCDEF void dbg__test_arm_bkpt(void);
+FUNCDEF void dbg__test_thumb_bkpt(void);
+
+ /*@}*/
+
+#endif
+
+
+#endif /* __DEBUG_TEST_H__ */