1 // file: nios_gdb_stub.h
2 // Author: Altera Santa Cruz \ 2000
4 // You can modify this header file to
5 // enable some features useful for
6 // debugging the debugger. They're
7 // good features also to just show
8 // signs of life on your Nios board.
9 // But they consume valuable peripherals!
11 // The 'GDB_DEBUG_PRINT' option ties
12 // up the LCD living on the 5v port,
13 // showing useful internals of the stub.
20 #define ethernet_exists
25 #ifdef ethernet_exists
30 #define MAX_DATA_SIZE 650
31 #define kTextBufferSize ((2*MAX_DATA_SIZE)+4)
32 #define kMaximumBreakpoints 4
33 #define GDB_ETH_PORT 7070
34 #define GDB_WHOLE_PACKET 0
35 #define GDB_SKIP_FIRST 1
36 #define GDB_RETRY_CNT 3
39 * This register structure must match
40 * its counterpart in the GDB host, since
41 * it is blasted across in byte notation.
61 NiosGDBRegisters registers
;
62 int trapNumber
; // stashed by ISR, to distinguish types
63 char textBuffer
[kTextBufferSize
];
64 int breakpointCount
; // breakpoints used for stepping
68 NiosGDBBreakpoint breakpoint
[kMaximumBreakpoints
];
70 #ifdef ethernet_exists
71 volatile int ACKstatus
;
72 net_32 host_ip_address
;
73 net_16 host_port_number
;
79 #ifdef ethernet_exists
82 ne_gdb_ack_notwaiting
,
96 #ifndef GDB_DEBUG_PRINT
97 #define GDB_DEBUG_PRINT 0
100 void GDB_Main(void); // initialize gdb and begin.
102 char GDBGetChar(void);
103 void GDBPutChar(char c
);
104 void GDB_Print2(char *s
,int v1
,int v2
);