What should i buy to start learning JTAG debugg - Page 1
Forum section: electronics / general

author: debi
author_rank: Contributor
timestamp: March 26, 2021, 10:20:29 am
content: Hello guys,im newbie in jtag debugger but it looks like heaps of companies are seeking electronicien with knowledge in JTAG test around my city. As i love learning and make things myself at home, i was first planning to etch a JTAG debug board but the one i found has parallel ports which i don't have as i m using a laptop. From what i understood there r some universal jtag debugger with usb, there r also speicfic Jtag debuggers for Intel, XILINX, etc...So my question is, beside of OPENOCD, what jtag debuger would you recommend to learn this new environment ? I see all the compatible devices herehttp://openocd.org/doc/html/Debug-Adapter-Hardware.html#Debug-Adapter-HardwareId love to make my own but before thinking about it which one would you go for in the first place as newbie ?UPDATE : i found this product, might be the best solutionhttps://fr.aliexpress.com/item/4000837637863.html?spm=a2g0o.productlist.0.0.41863c518BnfuN&algo_pvid=589cf5e3-186c-4af0-a890-7c0a4ad5b6c0&algo_expid=589cf5e3-186c-4af0-a890-7c0a4ad5b6c0-3&btsid=0b0a01f816167559102445334e522c&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_thanks for your timecheers !

author: Bicurico
author_rank: Super Contributor
timestamp: March 26, 2021, 11:04:32 am
content: JTAG is an interface used to program and debug MCU's.I don't think that just knowing how to use a Segger J-Link or similar will land you any job!You will probably know how to program the MCU itself! That said, you should know how to program, debug, compile, decompile, etc. at least for ARM (which is probably the most popular core).Regards,Vitor

author: Syntax Error
author_rank: Frequent Contributor
timestamp: March 26, 2021, 11:58:41 am
content: For information, I recently reversed engineered one of the cheap 'Altera USB JTAG blasters' from ebay, and posted the result here:https://www.eevblog.com/forum/projects/altera-mini-usb-blaster-revision-c-clone-using-the-pic18f14k50/msg3138140/#msg3138140The important IC is the LVC244 which ensures the CPU voltage is set at the correct level. This blaster works with OpenOCD.Out of interest, this posting on the OpenWRT site uses Raspberry Pi and OpenOCD to flash the firmware on a Meraki access point via the EJTAG connector. Proving you do not need an expensive JTAG programmer!https://openwrt.org/toh/meraki/mr18/jtagGood luck.

author: penfold
author_rank: Frequent Contributor
timestamp: March 26, 2021, 01:10:19 pm
content: From the wording of your post "knowledge in JTAG test", I would imagine they are meaning boundary-scan rather than classic MCU debug (i may be wrong of course, but it would seem silly to specify JTAG in reference to MCU debug)The problem with boundary-scan is it can get very complex very quickly. In order to manipulate signals on the board, you need to clock through pretty large arrays of bits to set IO pins and read back statuses (imagine a huge shift register controlling the IO pins). Its an insanely useful tool for complex boards with interconnected FPGAs, memories and micros etc (assuming all are boundary-scan capable), by manipulating the IO pins via the boundary scan registers and clocking the resulting statuses back out, you can test continuity between pins, check for shorts and even do functional tests on SPI ADCs for example.But, the fun part is, that can be a hugely complex task to handle without some kind of abstraction layer. At first glance, I can't quite work out how the OpenOCD stuff supports boundary scan, I presume it's a basic "provide it with a test vector and it clocks back out the resulting statuses of the pins". Many companies often use some proprietary software like XJTAG or Corelis which provides a nice schematic netlist comprehension, automation of continuity checks and abstraction layers to emulate SPI protocols etc... but those tools are expensive... very very expensive.The OpenOCD looks promising and it would certainly be a valid learning exercise to get to grips with how you can impliment a useful boundary-scan test on such a low level, I'm sure there's even a reasonably priced dev-board with a boundary-scan capable MCU (low-end micros tend not to have boundary scan) or CPLD/FPGA.

author: joeqsmith
author_rank: Super Contributor
timestamp: March 26, 2021, 02:11:10 pm
content: QuoteHello. You should post the openings. It may help answer your question.I used JTAG very early on to test some boards using a Motorola 68K. Basically I was just bit banging a printer port on the PC. There were a few advantages. I could test the hardware without any firmware loaded and running. The advantage here is if the board had a problem it was very possible the firmware would not allow you to get very far in sorting out what was wrong. I could also then program the board after it was tested using the same port. No bed of nails. Just a small cable.I wrote spec and designed a JTAG interface that would have ran the state machine in an FPGA. The idea was to get some much needed speed.It all required in depth knowledge of the hardware and ability to write the software to control it. The first time I tried it, I just hooked a logic analyzer to a board and tried to toggle a bit. Baby steps.

author: debi
author_rank: Contributor
timestamp: March 26, 2021, 06:33:29 pm
content: Quote from: Bicurico on March 26, 2021, 11:04:32 amYes i didn't explain it clearly. I see job offers mentionning "some experiences in JTAG test" besides of a electronician background which im improving as i started a 2 years course 4 months ago. But we will not learn anything about jtag test unfortunatly so id like to learn it at home if i can. So i guess if i start with a development board as the link shown, it should be a good start.

author: debi
author_rank: Contributor
timestamp: March 26, 2021, 06:36:52 pm
content: Quote from: penfold on March 26, 2021, 01:10:19 pmYou r totally right, i was refering mostly about Boundary Scan test... Do you think the link i posted is the dev board to go with ?

author: debi
author_rank: Contributor
timestamp: March 26, 2021, 06:49:52 pm
content: Quote from: joeqsmith on March 26, 2021, 02:11:10 pmI m learning logic gates at the moment at school, its also the reason why i want to learn about FPGA tests. i found this. Might be the right first step.https://www.amazon.fr/innomaker-Logic-Analyzer/dp/B08TC2XCTY

author: debi
author_rank: Contributor
timestamp: March 26, 2021, 07:11:51 pm
content: Quote from: Syntax Error on March 26, 2021, 11:58:41 amyour links are great !!!!http://sa89a.net/ele/ub.htmi just need to find a way to translate it but its fine ! My "pcb etching addiction" is happythank yu

author: harerod
author_rank: Frequent Contributor
timestamp: March 26, 2021, 07:54:22 pm
content: @debi, thanks for the upvote in the other thread. Let me return the favor by sharing a quote by one of my heroes with you:"Also, take a little time with the spelling and grammar. I'm, er, elderly and old-fashioned and don't feel much like helping people who can't be bothered being polite or pressing their Shift keys." Jim Breen -http://nihongo.monash.edu/say_noh.htmlThat being said - welcome to the club.Regarding JTAG - Göpel is one name that comes to my mind.

author: debi
author_rank: Contributor
timestamp: March 26, 2021, 08:31:04 pm
content: Quote from: harerod on March 26, 2021, 07:54:22 pmI ll do my best ! also im not practising my english enough so it can look impolite, sorry for that.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: March 26, 2021, 08:50:02 pm
content: @debi - Your English is exellentHowever, my french is... trés mal?

author: penfold
author_rank: Frequent Contributor
timestamp: March 26, 2021, 11:16:11 pm
content: Quote from: debi on March 26, 2021, 06:36:52 pmYeah, that dev kit doesn't look too bad, there are some LEDs and some IO to give you something to test and experiment with, the USB Blaster supposedly supports boundary-scan.. not that it is any huge hardware difficulty to implement (readily bit-bangable through parallel ports or FTDI chips as has been mentioned) - it's just that some manufacturers don't bother with it in their firmware or prefer to obfuscate it a bit through proprietary stuff - I think the Bit Blaster should be okay or at least seems well supported by OpenOCD.Something to perhaps think about when you're experimenting (once you've got it set up to send in a test vector, read back a result and be able to correlate the two to get "some" result) is to think more about the test methodologies and how you get exploit jtag capabilities to get more test coverage on your board with minimal human intervention or a huge bed if nails to assist it. And that's more from the perspective that a potential employer would be more interested in knowing that you can work out nice simple reliable test routines and get loads of coverage than whether or not you've learned with any specific tool.

author: harerod
author_rank: Frequent Contributor
timestamp: March 26, 2021, 11:39:31 pm
content: QuoteC'est une erreur syntactique, je crois? Très mal... *scnr*debi, if the native speakers are happy, what could I say?However, in this line of work precision is paramount and not using a shift-key for "i", or leaving out apostrophes ("4" key on AZERTY keyboard) will make people doubt your dedication. I was not writing about grammar or punctuation. I always take great care to make plenty of mistakes in those categories.

author: debi
author_rank: Contributor
timestamp: April 29, 2021, 01:33:33 pm
content: Quote from: penfold on March 26, 2021, 11:16:11 pmHi Penfold and all of you that took time to answer me. I didn't have the notifications on so i just saw your answers.There were no more dev boards as shown in my first post so i bought a cheaper one with the USB blaster includedhttps://fr.aliexpress.com/item/1005001633006584.html?spm=a2g0o.productlist.0.0.6852194bugHkan&algo_pvid=844302be-069c-4b8b-8e35-5030e8eb3964&algo_expid=844302be-069c-4b8b-8e35-5030e8eb3964-0&btsid=2100bb4c16197029669108992ef62f&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_I followed steps from a tutorial to make the devices recognized by quartus lite and as far as i know it s working fine. Im just running out of time to dig the software but ill give it a go this afternoon. CHeers !