1 #ifndef __DEBUG_H__
2 #define __DEBUG_H__
3 
4 #include <gctypes.h>
5 
6 #define GDBSTUB_DEVICE_USB		0			/*!< device type: USBGecko */
7 #define GDBSTUB_DEVICE_TCP		1			/*!< device type: BBA-TCP */
8 
9 #define GDBSTUB_DEF_CHANNEL		0			/*!< default EXI channel. channel can be 0 or 1. Note: Used for device type USBGecko  */
10 #define GDBSTUB_DEF_TCPPORT		2828		/*!< default TCP port. Note: Used for device type TCP */
11 
12 #ifdef __cplusplus
13 	extern "C" {
14 #endif
15 
16 extern const char *tcp_localip;
17 extern const char *tcp_netmask;
18 extern const char *tcp_gateway;
19 
20 /*!\fn void _break()
21  * \brief Stub function to insert the hardware break instruction. This function is used to enter the debug stub and to
22  *        connect with the host. The developer is free to insert this function at any position in project's source code.
23  *
24  * \return none.
25  */
26 void _break();
27 
28 /*!\fn void DEBUG_Init(s32 device_type,s32 channel_port)
29  * \brief Performs the initialization of the debug stub.
30  * \param[in] device_type type of device to use. can be either USB or TCP.
31  * \param[in] channel_port depending on the used device this can be either the EXI channel or the TCP port.
32  *
33  * \return none.
34  */
35 void DEBUG_Init(s32 device_type,s32 channel_port);
36 
37 #ifdef __cplusplus
38 	}
39 #endif
40 
41 #endif
42