debugchain.h
来自「ARM核的边界扫描(JTAG)的实现,此代码在s3c2400上测试通过」· C头文件 代码 · 共 47 行
H
47 行
//////////////////////////////////////////////////////////////////////////////
// DebugChain.h //
//////////////////////////////////////////////////////////////////////////////
/*
Debug chain
*/
#ifndef _DEBUGCHAIN_H
#define _DEBUGCHAIN_H
//////////////////////////////////////////////////////////////////////////////
// Includes //
//////////////////////////////////////////////////////////////////////////////
#include "Chain.h"
//////////////////////////////////////////////////////////////////////////////
// DebugChain //
//////////////////////////////////////////////////////////////////////////////
#pragma pack(1)
class DebugChain : public Chain
{
public:
unsigned data : 32;
unsigned dden : 1; // INTEST: capture dden status, EXTEST: 1=write, 0=read
unsigned wptandbkpt : 1; // in case of watchpoint, this bit returns 1 if also a breakpoint occurred
unsigned sysspeed : 1; // synchronize clock. returns cause of debug mode: 0=breakpoint, 1=watchpoint
unsigned instruction : 32; // reversed
static void Select() { JTAG::Command(JTAG::INTEST); JTAG::Chain(1); }
static int GetLength() { return 67; }
unsigned int Exec(unsigned int instruction, int systemspeed, int data = 0)
{
this->data = data;
this->dden = 0;
this->wptandbkpt = 0;
this->sysspeed = systemspeed;
this->instruction = Reverse(instruction);
Select();
JTAG::Transfer(this, GetLength());
return this->data;
}
};
#pragma pack()
#endif // _DEBUGCHAIN_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?