From e3521e37c5ac486c10c67e738eca50abebc0ed62 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Sat, 9 Jul 2011 07:42:56 +0800 Subject: added preliminary abort mode support Interface to platform specific LCD Display routines --- Debugger/debug_runlooptasks.S | 30 +++++++++++++++++++++++++++++- Debugger/debug_runlooptasks.h | 12 +++++++----- 2 files changed, 36 insertions(+), 6 deletions(-) (limited to 'Debugger') 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 -- cgit v1.2.3