Commit ba2fe1d1 authored by lcgamboa's avatar lcgamboa

chg: debug name defined in board class now !minor

parent cd528a00
...@@ -207,6 +207,11 @@ class board ...@@ -207,6 +207,11 @@ class board
* @brief Start debug support * @brief Start debug support
*/ */
virtual int DebugInit(int dtyppe)=0; virtual int DebugInit(int dtyppe)=0;
/**
* @brief Get debug interface name
*/
virtual String GetDebugName(void)=0;
/** /**
* @brief debug step (pooling) * @brief debug step (pooling)
......
...@@ -534,6 +534,21 @@ cboard_Breadboard::DebugInit(int dtyppe) ...@@ -534,6 +534,21 @@ cboard_Breadboard::DebugInit(int dtyppe)
return 0; return 0;
} }
String
cboard_Breadboard::GetDebugName(void)
{
switch (ptype)
{
case _PIC:
return board_picsim::GetDebugName ();
break;
case _AVR:
return board_simavr::GetDebugName ();
break;
}
return "";
}
void void
cboard_Breadboard::DebugLoop(void) cboard_Breadboard::DebugLoop(void)
{ {
......
...@@ -42,6 +42,7 @@ class cboard_Breadboard:public board_picsim, public board_simavr ...@@ -42,6 +42,7 @@ class cboard_Breadboard:public board_picsim, public board_simavr
lxBitmap * micbmp; lxBitmap * micbmp;
public: public:
int DebugInit(int dtyppe); int DebugInit(int dtyppe);
String GetDebugName(void);
void DebugLoop(void); void DebugLoop(void);
int CpuInitialized(void); int CpuInitialized(void);
void MSetSerial(const char * port); void MSetSerial(const char * port);
......
...@@ -34,6 +34,7 @@ class board_picsim: virtual public board ...@@ -34,6 +34,7 @@ class board_picsim: virtual public board
{ {
public: public:
int DebugInit(int dtyppe); int DebugInit(int dtyppe);
String GetDebugName(void){return "MDB";};
void DebugLoop(void); void DebugLoop(void);
int CpuInitialized(void); int CpuInitialized(void);
void MSetSerial(const char * port); void MSetSerial(const char * port);
......
...@@ -34,6 +34,7 @@ class board_qemu_stm32: virtual public board ...@@ -34,6 +34,7 @@ class board_qemu_stm32: virtual public board
public: public:
board_qemu_stm32(void); board_qemu_stm32(void);
int DebugInit(int dtyppe); int DebugInit(int dtyppe);
String GetDebugName(void){return "GDB";};
void DebugLoop(void); void DebugLoop(void);
int CpuInitialized(void); int CpuInitialized(void);
void MSetSerial(const char * port); void MSetSerial(const char * port);
......
...@@ -383,6 +383,20 @@ board_simavr::DebugInit(int dtyppe) ...@@ -383,6 +383,20 @@ board_simavr::DebugInit(int dtyppe)
} }
} }
String
board_simavr::GetDebugName(void)
{
if (avr_debug_type)
{
return "GDB";
}
else
{
return "MDB";
}
}
void void
board_simavr::DebugLoop(void) board_simavr::DebugLoop(void)
{ {
......
...@@ -46,6 +46,7 @@ class board_simavr: virtual public board ...@@ -46,6 +46,7 @@ class board_simavr: virtual public board
public: public:
board_simavr(void);//Called once on board creation board_simavr(void);//Called once on board creation
int DebugInit(int dtyppe); int DebugInit(int dtyppe);
String GetDebugName(void);
void DebugLoop(void); void DebugLoop(void);
int CpuInitialized(void); int CpuInitialized(void);
void MSetSerial(const char * port); void MSetSerial(const char * port);
......
...@@ -34,6 +34,7 @@ class board_ucsim: virtual public board ...@@ -34,6 +34,7 @@ class board_ucsim: virtual public board
public: public:
board_ucsim(void); board_ucsim(void);
int DebugInit(int dtyppe); int DebugInit(int dtyppe);
String GetDebugName(void){return "uCsim";};
void DebugLoop(void); void DebugLoop(void);
int CpuInitialized(void); int CpuInitialized(void);
void MSetSerial(const char * port); void MSetSerial(const char * port);
......
...@@ -478,14 +478,7 @@ CPWindow1::Configure(CControl * control, const char * home) ...@@ -478,14 +478,7 @@ CPWindow1::Configure(CControl * control, const char * home)
} }
else else
{ {
if (ret) statusbar1.SetField (1, status + lxT ("Debug: ")+pboard->GetDebugName() +":"+ itoa (debug_port));
{
statusbar1.SetField (1, status + lxT ("Debug: GDB:") + itoa (debug_port));
}
else
{
statusbar1.SetField (1, status + lxT ("Debug: MDB:") + itoa (debug_port));
}
} }
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment