aboutsummaryrefslogtreecommitdiff
path: root/Debugger
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-07-09 07:42:56 +0800
committerTat-Chee Wan (USM)2011-07-09 07:42:56 +0800
commite3521e37c5ac486c10c67e738eca50abebc0ed62 (patch)
tree8d31a2154563fbe9a2287a95c5057b4a6358664d /Debugger
parentd59b9a5172b31b3ab3fb60e7f6bf7af6cf7caf91 (diff)
added preliminary abort mode support
Interface to platform specific LCD Display routines
Diffstat (limited to 'Debugger')
-rw-r--r--Debugger/debug_runlooptasks.S30
-rw-r--r--Debugger/debug_runlooptasks.h12
2 files changed, 36 insertions, 6 deletions
diff --git a/Debugger/debug_runlooptasks.S b/Debugger/debug_runlooptasks.S
index 8eed3ad..dcca3b1 100644
--- a/Debugger/debug_runlooptasks.S
+++ b/Debugger/debug_runlooptasks.S
@@ -88,7 +88,6 @@
* NxOS Run Loop
*
****************************************************************************/
- .extern nx_systick_wait_ms
dbg__runloopTasks:
/* Currently, there's nothing that needs to be done in the NxOS Run Loop */
push {lr}
@@ -169,6 +168,35 @@ _dbg__reboot_wait:
b _dbg__reboot_wait /* Wait for AVR... */
#endif
+#ifdef __NXOS__
+/****************************************************************************
+ *
+ * NxOS Abort Info LCD Display Routine
+ *
+ ****************************************************************************/
+/* On entry:
+ * r0: abort type
+ * On exit:
+ * r0-r3: destroyed
+ */
+dbg__display_abort_info:
+ push {lr}
+ _getdbgregister DBGSTACK_USERPC_INDEX, r1 /* Retrieve User PC into R2 */
+ _getdbgregister DBGSTACK_USERCPSR_INDEX, r2 /* Retrieve User CPSR into R2 */
+ bl nx__abort_info /* void nx__abort_info(U32 data, U32 pc, U32 cpsr); */
+ pop {pc}
+
+#else
+/****************************************************************************
+ *
+ * NXT Firmware Abort Info LCD Display Routine
+ *
+ ****************************************************************************/
+dbg__display_abort_info:
+/* FIXME: Inteface with NXT Firmware LCD Display routines */
+ push {lr}
+ pop {pc}
+#endif
#ifdef __NXOS__
.extern debug_OutCommBuf
diff --git a/Debugger/debug_runlooptasks.h b/Debugger/debug_runlooptasks.h
index 6eb0461..f55311e 100644
--- a/Debugger/debug_runlooptasks.h
+++ b/Debugger/debug_runlooptasks.h
@@ -26,8 +26,10 @@
*/
#ifdef __NXOS__
+ .extern nx__abort_info
+ .extern nx_systick_wait_ms
- .extern nx_usb_is_connected
+ .extern nx_usb_is_connected
.extern nx_usb_can_write
.extern nx_usb_write
.extern nx_usb_data_written
@@ -45,10 +47,10 @@
.extern dUsbRead
.extern dUsbIsConfigured
.extern dBtSendMsg
- .equ nxt_UBYTE_TRUE, 1
- .equ nxt_UBYTE_FALSE, 0
- .equ USB_CMD_READY, 0x01 /* From c_comm.iom */
- .equ BT_CMD_READY, 0x02 /* From c_comm.iom */
+ .equ nxt_UBYTE_TRUE, 1
+ .equ nxt_UBYTE_FALSE, 0
+ .equ USB_CMD_READY, 0x01 /* From c_comm.iom */
+ .equ BT_CMD_READY, 0x02 /* From c_comm.iom */
.extern dIOCtrlSetPower
.extern dIOCtrlSetPwm