- make debugger work
- removed dbg_uart and GDB stuff

git-svn-id: http://moon:8086/svn/mips@184 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2021-11-22 15:35:26 +00:00
parent 8c2721eeb9
commit b3c9daf1d7
2 changed files with 6 additions and 42 deletions
+5 -41
View File
@@ -18,24 +18,8 @@
#ifdef WITH_ROM_DEBUGGER
const fp_xcpt_t dbg_func = (fp_xcpt_t)0xbfc01fc0;
#else
#ifdef WITH_GDB_STUB
extern void handle_exception (unsigned long *registers);
#else
extern int dbg_handler(struct xcptcontext * xcp);
#endif
int dbg_stub(struct xcptcontext * xcp) __attribute__ ((section (".dbg_stub"))) __attribute__ ((used));
int dbg_stub(struct xcptcontext * xcp)
{
#ifdef WITH_GDB_STUB
handle_exception((unsigned long *)xcp);
return 0;
#else
return dbg_handler(xcp);
#endif
}
const fp_xcpt_t dbg_func = (fp_xcpt_t)dbg_stub;
const fp_xcpt_t dbg_func = (fp_xcpt_t)dbg_handler;
#endif
// ---------------------------------------------------------------------------------
@@ -66,28 +50,11 @@ const con_if_t con_if =
con_if_entry, ARRAYSIZE(con_if_entry)
};
void dbg_uart_isr(struct xcptcontext *xcp)
{
if(SYS_UART_BIT_RX_AVAIL & *uart_if[UART_DEBUGGER].pCTRL)
{
char c = *uart_if[UART_DEBUGGER].pDATA;
if (c == 3)
{
dbg_func(xcp);
}
}
}
void dbg_uart_setup()
{
const int UART_INT = SYS_INT_UART;
*uart_if[UART_DEBUGGER].pCTRL = SYS_UART_BIT_RX_INTEN;
interrupt_register(UART_INT, dbg_uart_isr);
interrupt_enable(UART_INT);
}
void dbg_init()
{
interrupt_register(2, dbg_func);
interrupt_enable(2);
xcpt_register(EXC_ADEL, dbg_func);
xcpt_register(EXC_ADES, dbg_func);
xcpt_register(EXC_IBE, dbg_func);
@@ -111,11 +78,8 @@ void board_init(void)
// Setup syscall support
syscalls_init();
// Setup Uart ISR
// dbg_uart_setup();
// Setup debugger
// dbg_init();
dbg_init();
// Setup interrupt support
interrupt_init();
+1 -1
View File
@@ -16,7 +16,7 @@
#define CPU_FREQ_HZ 100000000
#define UART_STDIO 0
#define UART_DEBUGGER 1
#define UART_DEBUGGER 0
// ---------------------------------------------------------
// IRQs