-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typo in jtag.c #134
Comments
err.. yeah. That looks like a bug. It was likely a while (words < 250) at some point. |
Fixes issue BusPirate#134
Fixed in dd7fbb0? |
I'm amazed this wasn't caught sooner. Wouldn't this have totally broken JTAG functionality? |
@yodaldevoid @ironiridis @everyone Starting from https://github.com/BusPirate/Bus_Pirate/archive/dd7fbb0fedd27c08b9c33501ebbe4b28d8085cba.zip provided by Gabriel Smith aka yodaldevoid, I have built test firmware busPirate_JTAG_UNSAFE_1.hex which has hardware I2C freed and busPirate-JTAG_SAFE_1.hex which has not. http://dangerousprototypes.com/forum/index.php?topic=8498.msg71171#msg71171 About the SAFE and UNSAFE version, please read these: http://dangerousprototypes.com/forum/index.php?topic=8760.msg70072#msg70072 Sadly at this moment I can not verify the functioning of the JTAG part, so I ask the courtesy to anyone who is able of doing it to try one of the two firmware and give a response, thanks. |
Hopefully this leads to a BPv4 fix, because I'd love to have JTAG on my v4.... |
busPirate_JTAG_UNSAFE_1.hex and busPirate-JTAG_SAFE_1.hex are both firmware for Bus Pirate v3 (BPv3). http://dangerousprototypes.com/forum/index.php?topic=8498.msg71171#msg71171 Sadly I can not verify them for the functioning of the JTAG part, therefore it is need that someone verify and report if they work or not. |
Fixes issue BusPirate#134
At first I did not understand the meaning of your message, but now I understand it and I must tell you that you have done an excellent job providing the community with a great service, you really had an excellent idea! |
@USBEprom -
(1)>no mode change I don't see the JTAG enabled here, though everything else seems to be working fine. |
@USBEprom Yes - I do, so i'm testing as I can. If you enable it, I can test it. I just can't build it |
Although I do not have a Bus Pirate v4 to test it, I have built a firmware for that device where the JTAG option is enabled. |
those builds there don't have the jtag patch included (yet). Let me work on finishing up #152 and I can see about the other stuff later. |
As I have already written, I do not own a Bus Pirate v4, I only have a Bus Pirate v3. http://dangerousprototypes.com/docs/JTAG NOTE: As of v5.9 the JTAG terminal library was moved to the Bus Pirate bonus/extras firmware. Bus Pirate firmware v5+ (main firmware) includes support for the OpenOCD JTAG debugger instead, this is a much better option. http://dangerousprototypes.com/forum/index.php?topic=2207.0 The ONLY THING removed from the firmware is JTAG terminal mode. NOBODY used JTAG terminal mode, and it will NOT help you to flash a device. It is not a console concept either. It is a way to entering raw byte values into JTAG registers. If you learned the flashing protocol (by hand), you could type in the raw byte values (100,000s of them) into the terminal mode, but nobody would do this, applications like OpenOCD automate it. From http://dangerousprototypes.com/docs/Bus_Pirate Several applications can use the Bus Pirate as a programmer or debugger. JTAG The Bus Pirate is a slow serial port device intended for human-speed interaction. It was NEVER intended to do JTAG duties. Because it's open source, cheap, and versatile, the community hacked various JTAG features into it. They're great in a pinch, but no substitute for the real thing! The Bus Pirate supports JTAG in three ways: with the OpenOCD debug application, as an XSVF player, and through a user-mode terminal interface. The Bus Pirate is supported as a JTAG programmer/debugger by OpenOCD. If your target is supported by OpenOCD it may work. Slowly :) You will need to use a Bus Pirate firmware version which supports the binary JTAG protocol — not all do. Note that the above is about binary JTAG / OpenOCD support. JTAG terminal mode is not enabled in any of the above firmwares (not even 5.9-extras, even though it was advertised to be enabled in there at some point). JTAG terminal mode The -extras firmware has a the old user terminal JTAG mode from the Hack a Day demo. This was removed from the main firmware because nobody used it - it isn't particularly useful to enter JTAG commands manually. (OpenOCD uses the binary JTAG mode, which is different from the user terminal JTAG mode.) Talking about the Bus Pirate v3, as of v5.9 the JTAG terminal library has been removed and moved to the Bus Pirate bonus/extras firmware. http://dangerousprototypes.com/forum/index.php?topic=4550.0 About patch, the firmware FW_BPv4_JTAG_opt1.hex I provided here and the ones for Bus Pirate v3 named busPirate-JTAG_SAFE_1.hex and busPirate_JTAG_UNSAFE_1.hex that I have shared on dangerousprototypes.com forum (http://dangerousprototypes.com/forum/index.php?topic=8498.msg71171#msg71171), all them have the one in jtag.c provided from Gabriel Smith aka yodaldevoid, as follows: `@@ -102,7 +102,7 @@ void jtag(void) {'
I do not know if that is enough, though, because at this moment I can not verify the functioning of the JTAG side. |
Ah! I missed where they took the jtag console option out, and I was using that as the indicator for support. Mea culpa! I hooked up my bp4 to my rPi, configured a local config file appropriately, and was able to get OpenOCD to talk correctly to the bp4. I did notice that sometimes when closing, it didn't reset the configuration correctly, so I had to button-reset the bp4 before re-running OpenOCD - that's not a terrible workaround, though. The 'mode' LED lights up when things are working correctly, it seems. i haven't hooked it up to an actual JTAG host yet, since i think i killed my pogoplug fully and I don't have anything else laying around JTAG capable and "disposable" But so far it's looking pretty good. |
Thank you very much for sharing your experience, really much appreciated, thanks! |
Was just reading over jtag.c and noticed this:
Bus_Pirate/Firmware/jtag.c
Lines 102 to 108 in b580ca9
Should that be
words > 250
? It will alwaysbreak
on the first loop iteration.The text was updated successfully, but these errors were encountered: