Hello,
I have sent this as a support ticket but had no response since May 15, I will post it here again.
we are trying to use the jlink debugger to debug our custom SoC.
Our JTAG chain contains 2 taps: each one connected to a separate Risc-V processor. We are facing a problem where jlinkGDBServer isn't able to detect the 2 CPU TAPs (openocd connects successfully)
The JTAG chain looks as follows: TDI -> TAP1(RV32) -> TAP0(RV32) -> TDO. Both taps have an IR length of 5.
we run the following jlink command, trying to connect to tap 0:
>>> JLinkGDBServer -device rv32 -speed auto -vd -jlinkscriptfile script.JLinkScript
with the script file 'script.JlinkScript' containing the following:
void ConfigTargetSettings(void) {
// connect to TAP0
JTAG_IRPre = 0; // Sum of IRLen of all JTAG TAPs preceding the one we want to communicate ith
JTAG_DRPre = 0; // Number of JTAG TAPs preceding the one we want to communicate with
JTAG_IRPost = 5; // Sum of IRLen of all JTAG TAPs following the one we want to communicate with
JTAG_DRPost = 1; // Number of JTAG TAPs following the one we want to communicate with
JTAG_IRLen = 5; // IRLen of device we want to communicate with
JTAG_AllowTAPReset = 1;
JTAG_SetDeviceId(0, 0x10004c6f);
JTAG_SetDeviceId(1, 0x10003c6f);
return 0;
}
We get this output:
ERROR: CPU-TAP not found in JTAG chain
ERROR: CPU-TAP not found in JTAG chain
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
we even tried the following, specifying the offset of tap 0 inside the chain:
>>> JLinkGDBServer -device rv32 speed auto -vd -jtagconf 0,0
but to no avail.
However, if we run JlinkExe, type connect and run through the whole menu, we get this:
TotalIRLen = 10, IRPrint = 0x00A5
JTAG chain detection found 2 devices:
#0 Id: 0x10004C6F, IRLen: ?, Unknown device
#1 Id: 0x10003C6F, IRLen: ?, Unknown device
****** Error: CPU-TAP not found in JTAG chain
Error occurred: Could not connect to the target device.
For troubleshooting steps visit: wiki.segger.com/J-Link_Troubleshooting
The same happens when we also specify JtagConf 0,0 inside the menu.
Is there a way we can know in more detail what is failing so we can debug on the hardware side ?
NOTE: if we connect either CPUs directly to JLINK there are no problems, the problem is only when daisy chaining them.
NOTE 2: if we change the IDCODE to have the manufacturer ID of another RISC-V company like sifive, the device connects and identifies the TAPs, but doesn't with our manufacturer ID
I have sent this as a support ticket but had no response since May 15, I will post it here again.
we are trying to use the jlink debugger to debug our custom SoC.
Our JTAG chain contains 2 taps: each one connected to a separate Risc-V processor. We are facing a problem where jlinkGDBServer isn't able to detect the 2 CPU TAPs (openocd connects successfully)
The JTAG chain looks as follows: TDI -> TAP1(RV32) -> TAP0(RV32) -> TDO. Both taps have an IR length of 5.
we run the following jlink command, trying to connect to tap 0:
>>> JLinkGDBServer -device rv32 -speed auto -vd -jlinkscriptfile script.JLinkScript
with the script file 'script.JlinkScript' containing the following:
void ConfigTargetSettings(void) {
// connect to TAP0
JTAG_IRPre = 0; // Sum of IRLen of all JTAG TAPs preceding the one we want to communicate ith
JTAG_DRPre = 0; // Number of JTAG TAPs preceding the one we want to communicate with
JTAG_IRPost = 5; // Sum of IRLen of all JTAG TAPs following the one we want to communicate with
JTAG_DRPost = 1; // Number of JTAG TAPs following the one we want to communicate with
JTAG_IRLen = 5; // IRLen of device we want to communicate with
JTAG_AllowTAPReset = 1;
JTAG_SetDeviceId(0, 0x10004c6f);
JTAG_SetDeviceId(1, 0x10003c6f);
return 0;
}
We get this output:
ERROR: CPU-TAP not found in JTAG chain
ERROR: CPU-TAP not found in JTAG chain
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
we even tried the following, specifying the offset of tap 0 inside the chain:
>>> JLinkGDBServer -device rv32 speed auto -vd -jtagconf 0,0
but to no avail.
However, if we run JlinkExe, type connect and run through the whole menu, we get this:
TotalIRLen = 10, IRPrint = 0x00A5
JTAG chain detection found 2 devices:
#0 Id: 0x10004C6F, IRLen: ?, Unknown device
#1 Id: 0x10003C6F, IRLen: ?, Unknown device
****** Error: CPU-TAP not found in JTAG chain
Error occurred: Could not connect to the target device.
For troubleshooting steps visit: wiki.segger.com/J-Link_Troubleshooting
The same happens when we also specify JtagConf 0,0 inside the menu.
Is there a way we can know in more detail what is failing so we can debug on the hardware side ?
NOTE: if we connect either CPUs directly to JLINK there are no problems, the problem is only when daisy chaining them.
NOTE 2: if we change the IDCODE to have the manufacturer ID of another RISC-V company like sifive, the device connects and identifies the TAPs, but doesn't with our manufacturer ID