Commit ba2fe1d1 authored by lcgamboa's avatar lcgamboa

chg: debug name defined in board class now !minor

parent cd528a00
......@@ -208,6 +208,11 @@ class board
*/
virtual int DebugInit(int dtyppe)=0;
/**
* @brief Get debug interface name
*/
virtual String GetDebugName(void)=0;
/**
* @brief debug step (pooling)
*/
......
......@@ -534,6 +534,21 @@ cboard_Breadboard::DebugInit(int dtyppe)
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
cboard_Breadboard::DebugLoop(void)
{
......
......@@ -42,6 +42,7 @@ class cboard_Breadboard:public board_picsim, public board_simavr
lxBitmap * micbmp;
public:
int DebugInit(int dtyppe);
String GetDebugName(void);
void DebugLoop(void);
int CpuInitialized(void);
void MSetSerial(const char * port);
......
......@@ -34,6 +34,7 @@ class board_picsim: virtual public board
{
public:
int DebugInit(int dtyppe);
String GetDebugName(void){return "MDB";};
void DebugLoop(void);
int CpuInitialized(void);
void MSetSerial(const char * port);
......
......@@ -34,6 +34,7 @@ class board_qemu_stm32: virtual public board
public:
board_qemu_stm32(void);
int DebugInit(int dtyppe);
String GetDebugName(void){return "GDB";};
void DebugLoop(void);
int CpuInitialized(void);
void MSetSerial(const char * port);
......
......@@ -383,6 +383,20 @@ board_simavr::DebugInit(int dtyppe)
}
}
String
board_simavr::GetDebugName(void)
{
if (avr_debug_type)
{
return "GDB";
}
else
{
return "MDB";
}
}
void
board_simavr::DebugLoop(void)
{
......
......@@ -46,6 +46,7 @@ class board_simavr: virtual public board
public:
board_simavr(void);//Called once on board creation
int DebugInit(int dtyppe);
String GetDebugName(void);
void DebugLoop(void);
int CpuInitialized(void);
void MSetSerial(const char * port);
......
......@@ -34,6 +34,7 @@ class board_ucsim: virtual public board
public:
board_ucsim(void);
int DebugInit(int dtyppe);
String GetDebugName(void){return "uCsim";};
void DebugLoop(void);
int CpuInitialized(void);
void MSetSerial(const char * port);
......
......@@ -478,14 +478,7 @@ CPWindow1::Configure(CControl * control, const char * home)
}
else
{
if (ret)
{
statusbar1.SetField (1, status + lxT ("Debug: GDB:") + itoa (debug_port));
}
else
{
statusbar1.SetField (1, status + lxT ("Debug: MDB:") + itoa (debug_port));
}
statusbar1.SetField (1, status + lxT ("Debug: ")+pboard->GetDebugName() +":"+ itoa (debug_port));
}
}
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