Porting DirtyJTAG

Of course. I’m sorry, I didn’t mean to suggest you do it :slight_smile: I meant to say I don’t want to mess with it yet, but I’m not fundamentally opposed to it and several people have requested it.

4 Likes

No worries, that’s not what I meant. I think it would be fun to jump into that, but I’m easily distracted :smiley:

4 Likes

The CPLD dev board arrived :slight_smile: I’ll try out urjtag and also port the bluetag jtagulator thing soon.

2 Likes

Here is a new compile with the latest updates from the DirtyJTAG-pico repo. It fixes some issues with urjtag:

dirtyJtag.zip (45.1 KB)

I’m trying out the dirtyJtag on my BP through Win11. It seems I’m not able to get it to run properly. In the Device manager, it says DirtyJTAG is missing a driver (do I need to update the driver?). Also, COM25 doesn’t seem to respond (tried some different baud rates like 9600, 115400, etc…no go). Has anyone encountered something what I described?

1 Like

Hi @EmmanuelT - Which firmware have you tried? The latest I’m not certain about, but the one prior to that should work.

I may have missed a setting when I merged the changes from the upstream project.

1 Like

I downloaded the firmware that was posted recently (2 days ago). I can try a previous version .

The latest version posted works well for me.
If you are using a Windows machine, you need to use Zadig to create a driver for DirtyJTAG. Pick WinUSB (v6.1.XXXXX)
You will see DirtyJTAG under Universal Serial Bus devices

1 Like

Well, the DirtyJTAG interface works but it seems that the serial port does not.

1 Like

I will look into that. The merge wasn’t flawless and that’s my fault.

I also noticed that the arrows on the display are not all correct.
The ones that I think are wrong are below:
I am assuming that → is an output and ← is an input from BP point of vue.
UTX should be →
URX should be ←
TDI should be →
TDO should be ←
TCK should be →
I see that the picture near the top of this thread is correct. Something went wrong after that.

2 Likes

Thats why I got confused! And was randomly swapping TDO and TDI

1 Like

I updated the way labels are handled in pirate-lib and didn’t update dirtyjtag to match. I’m working on this one.

dirtyJtag.zip (45.1 KB)

Fixed the pin labels, but the UART is weird. Went back to an older commit and it seems like both uarts are being activated and the correct one is inverted?

Flipped back and forth between commits and now I can’t even get it working on the older commits. It was really ugly to get everything merged and I don’t quite get whats going on in the history.

I’ll have to continue debugging later, this one has my eyes hurting.

@ian It is a problem of pin initialization. As it stands now, the BIO pins gets initted to GPIO after the uart has initialized them to UART TX-RX. I sent you an email about this yesterday

2 Likes

I am uploading a fixed version. I hope it helps @EmmanuelT
dirtyJtag.zip (44.4 KB)

2 Likes

Thank you, I will have a fix in the repo shortly.

2 Likes

Hi @phdussud, I tried using the version you provided, but I wasn’t successful at getting it running. I ran the zadig driver switching to the libusb driver. From there, I tried connecting to serial port 25 (listed on my machine), but couldn’t get anything to come up the terminal.


I also tried Ian’s version (Feb6), and wasn’t successful on that either. Maybe it’s my setup, will just hold off for now.

1 Like

@EmmanuelT First of all, DirtyJTAG does not have a terminal UI. It is driven by a program that attaches to its binary interface. The COM port is there to provide a physical serial port. The TX line is IO0 (UTX ->) and the RX line is IO1(URX <-). If you join them together and connect a terminal program to the COM interface, you should see an echo of every character you type.
I see on your picture that you didn’t set the right driver with Zadig. The one I told you to use is WinUSB but I see you installed libusb-win32 instead. It won’t work unless you use the right driver.


After you have installed the right one, the driver manager will show this(ignore the billboard entry):
Screenshot 2025-02-16 091950
After, you need to use urJTAG or another program that allows you to access the JTAG interface of a device. Please take a look at this:
dirtyjtag/DirtyJTAG: JTAG probe firmware

2 Likes

Updating the port is on my list for this week, also thank you to @phdussud for the PM about the buffer speeds. I will address all this ASAP, but some other things are taking a bit longer than I expected.

3 Likes