2017-08-12 468 views
0

我需要指定JTAGenum Jtag枚举实用程序的用户配置设置。 特别地,在此部分JTAG指令寄存器长度,IR_LEN

// Target specific, check your documentation or guess 
#define SCAN_LEN     1890 // used for IR enum. bigger the better 
#define IR_LEN     5 
// IR registers must be IR_LEN wide: 
#define IR_IDCODE    "01100" // always 011 
#define IR_SAMPLE    "10100" // always 101 
#define IR_PRELOAD IR_SAMPLE 

在用户manual注意到,IR_LEN定义JTAG指令寄存器的长度。 "If you change this you should also add ‘0’s to each of the corresponding IR_** instruction definitions."

目标CPU的JTAG指令寄存器(IR)长度为4位。 所以我设置IR_LEN = 4

尚不清楚,如果我也应该改变#define IR_IDCODE#define IR_PRELOAD值,并且其中应添加提及的““0'到每一个对应的IR _ **指令定义的“。

+0

谁投这闲谈的使用问题,在错误这样做。在这种情况下,JTAG是通常用于加载和调试嵌入式软件的关键*开发工具,而开发工具问题是关于使用问题的通常策略的明确主题例外。 –

回答

1

你的起始点的寄存器长度为5,并显示5位代码。

根据你的引用指令,看起来当你将这个适配器用于一个4位寄存器时,你应该将这些代码缩短到4位,通过从每个位中删除最后的零来实现。

#define IR_LEN     4 
// IR registers must be IR_LEN wide: 
#define IR_IDCODE    "0110" // always 011 
#define IR_SAMPLE    "1010" // always 101