luojia65 / test-d1-flash-bare

Test run any program on D1 Nezha board flash
26 stars 6 forks source link

how to connect to use gdb with jtag #12

Open mo-pyy opened 1 year ago

mo-pyy commented 1 year ago

How do I connect gdb to the JTAG interface on my nezha-d1?

I could not find any resources on this, the sunxi also mentions jtag but doesn't specify on how to connect https://linux-sunxi.org/Allwinner_Nezha#JTAG

As you mentioned cargo gdb to debug code on the d1, do you have a solution?

luojia65 commented 1 year ago

You should connect to SD card interface with T-Head DebugServer and its special JTAG adapter. D1 uses non-standard debug module, this is the only way to debug software on chip. BTW, this JTAG inteface does not support to flash through JTAG, as it's not supported by DebugServer, and it's closed source so we cannot modify it to make it supported.