?? target28xx.h
字號:
// Target28xx.h: interface for the Target28xx class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TARGET28XX_H__6E2CE1FE_62E8_40BB_AFDD_9B6AF0A994FB__INCLUDED_)
#define AFX_TARGET28XX_H__6E2CE1FE_62E8_40BB_AFDD_9B6AF0A994FB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "sdti.h"
#include "process.h"
#include "coff.h"
#include "coffdefs.h"
#include "cofflib.h"
/* ==============================
Valid register names and size
{"PC", sizeof(TREG_32)
{"SP", sizeof(TREG_16)
{"ACC", sizeof(TREG_32)
{"P", sizeof(TREG_32)
{"T", sizeof(TREG_16)
{"ST0", sizeof(TREG_16)
{"ST1", sizeof(TREG_16)
{"AR0", sizeof(TREG_16)
{"AR1", sizeof(TREG_16)
{"AR2", sizeof(TREG_16)
{"AR3", sizeof(TREG_16)
{"AR4", sizeof(TREG_16)
{"AR5", sizeof(TREG_16)
{"XAR6", sizeof(TREG_32)
{"XAR7", sizeof(TREG_32)
{"IER", sizeof(TREG_16)
{"DP", sizeof(TREG_16)
{"IFR", sizeof(TREG_16)
{"DBGIER", sizeof(TREG_16)
// Added June 2004.
{"DBGIM", sizeof(TREG_16)
{"HPI", sizeof(TREG_16)
{"PREEMPT", sizeof(TREG_16)
// This is little hack to get C28xx XARx regs. The ids
// still match C27xx but low level driver will return 32
// bit value
{"XAR0", sizeof(TREG_32)
{"XAR1", sizeof(TREG_32)
{"XAR2", sizeof(TREG_32)
{"XAR3", sizeof(TREG_32)
{"XAR4", sizeof(TREG_32)
{"XAR5", sizeof(TREG_32)
*/
struct SYMBOL
{
char * symname; /* Symbol name */
unsigned long symaddr; /* Symbol memory address */
unsigned long sympage; /* Symbol page */
unsigned long symval; /* Symbol value @symaddr */
unsigned long symtype; /* Derived type */
unsigned long symsclass; /* Storage class */
unsigned long symnumaux; /* Num aux entries */
};
struct symbol_l
{
struct SYMBOL *s; /* Symbol pointed to by this list elem */
struct symbol_l *next; /* Next symbol in list */
};
typedef struct symbol_l SYMBOL_L;
struct swbp_symbol
{
struct SYMBOL *s; /* The symbol */
unsigned id; /* Id for the breakpoint */
struct swbp_symbol *prev; /* Previous sybmbol */
struct swbp_symbol *next; /* Next in list */
};
typedef struct swbp_symbol SWBP_SYMBOL;
#define REALMODE_POLITE TRUE
#define REALMODE_RUDE FALSE
#define CSTRING_TO_PCHAR (char*)(LPCTSTR)
class Target28xx
{
public:
Target28xx();
virtual ~Target28xx();
// Connection
BOOL OpenConnection( void );
BOOL CloseConnection(void);
BOOL CheckConnection(void);
// Basic run control
BOOL CheckEvents( void );
BOOL DoReset( void );
void InitEvent( void );
BOOL WaitForHaltEvent( void );
BOOL RunTarget( void );
BOOL StepTarget( DWORD Count );
BOOL RunTargetTillDone( void );
BOOL GoMain( void );
BOOL HaltTarget( void );
BOOL EnableRealtimeMode();
BOOL DisableRealtimeMode( void );
BOOL SwitchRealtimeMode( BOOL Polite );
// Memory access functions
BOOL ReadFromSymbol( char *pSymbol, DWORD *pVal );
BOOL WriteToSymbol( char *pSymbol, DWORD *pVal );
BOOL WriteMemory( MEM_TADDR Addr,
MEM_SPACE Space,
TREG_16 * pData,
DWORD Count );
BOOL ReadMemory( MEM_TADDR Addr,
MEM_SPACE Space,
TREG_16 * pData,
DWORD Count );
// Register access functions
BOOL WriteRegister( char * RegName, DWORD *pReg );
BOOL ReadRegister( char * RegName, DWORD *pReg );
// Breakpoints
SWBP_SYMBOL * FindSwbp( char * name );
BOOL DeleteSwbpList( void );
BOOL AddSwbp( char * name );
BOOL DeleteSwbp( char * name );
BOOL m_verboseError;
BOOL m_verboseMessage;
protected:
SD_TARGET_INTERFACE* m_pSdti_Intf;// SD Target Interface
SDTI_HNDL m_Sdti_Hndl; // SDTI handle
BOOL m_isConnected; // Do we have a connection
COFF_HNDL m_coffHndl; // Coff File Handle
COFF_OPTS m_coffOpts; // Coff File Options
CoffLib* m_coffLib; // Coff Lib Object
CString m_entryPoint; // Code entry point
BOOL m_useAltEntry; // Code entry point selector
CWnd* m_mainWindow; // Main dialog window
CString m_workingDirectory; // Current working directory
CString m_driverPathName; // Driver path and name
CString m_driverPath; // Driver path name
CString m_driverName; // Driver file name
CString m_coffFileName; // COFF file name
CString m_targetPath; // Target Board Path
CString m_boardName; // Board file name
CString m_BoardFile; // Board file path\name
CString m_procFamily; // SDTI processor family name, TMS320C27XX
// SDTI uses the original processor family
CString m_procName; // Board file processor cpu name, cpu_0
CString m_procAddr; // Processor emulation address
int m_bytesPerWord; // Processor's bytes per Word setting
// Symbol table support
long m_numSymbols;
TI_SYMENT m_sym;
TI_AUXENT m_aux;
SYMBOL_L * m_symlist;
SWBP_SYMBOL * m_swbplist;
DWORD m_ExecTimeoutMs;
TEVT_STAT_DESC m_Evt;
BOOL m_isRealTimeAllowed;
};
#endif // !defined(AFX_TARGET28XX_H__6E2CE1FE_62E8_40BB_AFDD_9B6AF0A994FB__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -