Author Topic: What should i buy to start learning JTAG debugg  (Read 2047 times)

0 Members and 1 Guest are viewing this topic.

Offline debiTopic starter

  • Contributor
  • Posts: 37
  • Country: fr
What should i buy to start learning JTAG debugg
« on: March 26, 2021, 10:20:29 am »
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 here http://openocd.org/doc/html/Debug-Adapter-Hardware.html#Debug-Adapter-Hardware

Id 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 solution https://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 time
cheers !  :-+
« Last Edit: March 26, 2021, 10:53:26 am by debi »
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1712
  • Country: pt
    • VMA's Satellite Blog
Re: What should i buy to start learning JTAG debugg
« Reply #1 on: March 26, 2021, 11:04:32 am »
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
 
The following users thanked this post: debi

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: What should i buy to start learning JTAG debugg
« Reply #2 on: March 26, 2021, 11:58:41 am »
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/#msg3138140

The 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/jtag

Good luck.
 
The following users thanked this post: debi

Offline penfold

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: gb
Re: What should i buy to start learning JTAG debugg
« Reply #3 on: March 26, 2021, 01:10:19 pm »
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.
 
The following users thanked this post: debi

Online joeqsmith

  • Super Contributor
  • ***
  • Posts: 11718
  • Country: us
Re: What should i buy to start learning JTAG debugg
« Reply #4 on: March 26, 2021, 02:11:10 pm »
Quote
im newbie in jtag debugger but it looks like heaps of companies are seeking electronicien with knowledge in JTAG test around my city.

Hello. 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.   


 
The following users thanked this post: debi

Offline debiTopic starter

  • Contributor
  • Posts: 37
  • Country: fr
Re: What should i buy to start learning JTAG debugg
« Reply #5 on: March 26, 2021, 06:33:29 pm »
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

Yes 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.
 

Offline debiTopic starter

  • Contributor
  • Posts: 37
  • Country: fr
Re: What should i buy to start learning JTAG debugg
« Reply #6 on: March 26, 2021, 06:36:52 pm »
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.

You 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 ?
 

Offline debiTopic starter

  • Contributor
  • Posts: 37
  • Country: fr
Re: What should i buy to start learning JTAG debugg
« Reply #7 on: March 26, 2021, 06:49:52 pm »
Quote
im newbie in jtag debugger but it looks like heaps of companies are seeking electronicien with knowledge in JTAG test around my city.

Hello. 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.

I 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
 

Offline debiTopic starter

  • Contributor
  • Posts: 37
  • Country: fr
Re: What should i buy to start learning JTAG debugg
« Reply #8 on: March 26, 2021, 07:11:51 pm »
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/#msg3138140

The 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/jtag

Good luck.

your links are great !!!! http://sa89a.net/ele/ub.htm i just need to find a way to translate it but its fine ! My "pcb etching addiction" is happy  :clap:

thank yu
 

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 449
  • Country: de
  • ee - digital & analog
    • My services:
Re: What should i buy to start learning JTAG debugg
« Reply #9 on: March 26, 2021, 07:54:22 pm »
@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.html

That being said - welcome to the club.

Regarding JTAG - Göpel is one name that comes to my mind.
 
The following users thanked this post: debi

Offline debiTopic starter

  • Contributor
  • Posts: 37
  • Country: fr
Re: What should i buy to start learning JTAG debugg
« Reply #10 on: March 26, 2021, 08:31:04 pm »
@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.html

That being said - welcome to the club.

Regarding JTAG - Göpel is one name that comes to my mind.

I ll do my best ! also im not practising my english enough so it can look impolite, sorry for that.
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: What should i buy to start learning JTAG debugg
« Reply #11 on: March 26, 2021, 08:50:02 pm »
@debi - Your English is exellent  :-+

However, my french is... trés mal?
 
The following users thanked this post: debi

Offline penfold

  • Frequent Contributor
  • **
  • Posts: 675
  • Country: gb
Re: What should i buy to start learning JTAG debugg
« Reply #12 on: March 26, 2021, 11:16:11 pm »
You 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 ?

Yeah, 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.
 
The following users thanked this post: debi

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 449
  • Country: de
  • ee - digital & analog
    • My services:
Re: What should i buy to start learning JTAG debugg
« Reply #13 on: March 26, 2021, 11:39:31 pm »
Quote
trés mal
C'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. ;)
 
The following users thanked this post: debi

Offline debiTopic starter

  • Contributor
  • Posts: 37
  • Country: fr
Re: What should i buy to start learning JTAG debugg
« Reply #14 on: April 29, 2021, 01:33:33 pm »
You 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 ?

Yeah, 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.

Hi 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 included https://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 !  :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf