jtagclass.h

来自「Source Code of jlinkserver for Segger JL」· C头文件 代码 · 共 47 行

H
47
字号
/** JTAG wrapper
*/
class JTAG {
public:
	JTAG();
	~JTAG();

	void FlashDownload(ELF* elf);
	void RamDownload(ELF* elf);
	void Go();
	void StartLogging();
	void Initialise();
	void MapRam(int flag);
	void EraseFlash();
	void FlashWrite(unsigned int address, unsigned int size, void* buffer);
	void InitialiseForFlashing();


private:

	void FlashCommand(unsigned int command, unsigned int page);

	static const unsigned int WP = 0x01;
	static const unsigned int SLB = 0x02;
	static const unsigned int WPL = 0x03;
	static const unsigned int CLB = 0x04;
	static const unsigned int EA = 0x08;
	static const unsigned int SGPB = 0x0B;
	static const unsigned int CGPB = 0x0D;
	static const unsigned int SSB = 0x0F;
	static const unsigned int EFC_BASE = 0xFFFFFF00;
	static const unsigned int PAGE_SIZE = 128;

	inline unsigned int ReadU32(unsigned int address) {
		unsigned int data;
		unsigned char status;
		JLINKARM_ReadMemU32(address, 1, &data, &status);
		return data;
	}

	inline void WriteU32(unsigned int address, unsigned int value) {
		JLINKARM_WriteU32(address, value);
	}


};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?