JTAG ports?

Are the JTAG ports of JH7110 available on visionfive 2? Seems they are not on 40-pin gpio port.

The area probably in the 40 pin header. They’re hard to find because there is a huge pin multiplexer that can be manipulated by code running before your code that can move them.

I haven’t successfully sussed them out yet on Pine64,. Though we did succeed (and build boards for) BeagleV.

Someone (dramforever?) Has a good blog post on this, but I don’t remember what board. It was while I was between JH parts.

1 Like

Thanks. I’ll try when I get the board.

I have configured some pinmux in dts and tried to connect the chip with jlink.
I got these error. Is the jlink not support the chip or other config issue ?
ConfigTargetSettings() start
ConfigTargetSettings() end
TotalIRLen = 10, IRPrint = 0x0021
JTAG chain detection found 2 devices:
#0 Id: 0x07110CFD, IRLen: 05, Unknown device
#1 Id: 0x07110CFD, IRLen: 05, Unknown device
Connect failed. Resetting via Reset pin and trying again.

Interesting that you see two and not four 7110’s.

You mention Segger’s Jlink. YOu may have to manually tell it which tap to use via their scripting tools, ala Manual setup of JTAG chain - SEGGER Wiki

1 Like

StarFive Official U-boot has been configured the JTAG port. Can be found here → u-boot/starfive_visionfive2.c at JH7110_VisionFive2_devel · starfive-tech/u-boot · GitHub
Corresponding to the 40pin header, as shown in the figure below

Using the jlink to connect the chip, can refer to J-Link RISC-V - SEGGER Wiki

int InitTarget(void) {
  // TDI -> TAP_#1 -> TAP_#0 -> TDO
  // TAP_#0 info:
  //   IRLen: 5
  //   TAPId: 0xDEB11001
  // TAP_#1 info:
  //   IRLen: 5
  //   TAPId: 0x20000913
  // Code to connect to TAP_#1
  JLINK_JTAG_DRPre  = 1;
  JLINK_JTAG_DRPost = 0;
  JLINK_JTAG_IRPre  = 5;
  JLINK_JTAG_IRPost = 0;
  JLINK_JTAG_IRLen  = 5;
  JLINK_JTAG_SetDeviceId(0, 0xDEB11001);
  JLINK_JTAG_SetDeviceId(1, 0x20000913);
  return 0;

Ozone with Jlink-v11 on tap1 like this: