• AVR Freaks

PIC32 JTAG

Page: 12 > Showing page 1 of 2
Author
mp035
Starting Member
  • Total Posts : 46
  • Reward points : 0
  • Joined: 2006/11/15 22:45:11
  • Location: 0
  • Status: offline
2007/11/14 06:48:35 (permalink)
0

PIC32 JTAG

Hi All,

I have a question re PIC32, the peripheral list states that there's a JTAG port. Can this be used for debugging? Or is it only for (boundary scan) testing?
#1

25 Replies Related Threads

    Alex B._
    Super Member
    • Total Posts : 266
    • Reward points : 0
    • Joined: 2006/10/17 15:26:10
    • Location: St-Petersburg, Russia
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 06:54:01 (permalink)
    0

    Can this be used for debugging? Or is it only for (boundary scan) testing?

    PIC32MX is fully support MIPS32 M4K EJTAG feature. I think Green Hills ans Ashling dev tool will use JTAG port for debug
    #2
    mp035
    Starting Member
    • Total Posts : 46
    • Reward points : 0
    • Joined: 2006/11/15 22:45:11
    • Location: 0
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 07:00:19 (permalink)
    0
    Thanks.
    #3
    Kiwi Mike AZ
    Super Member
    • Total Posts : 2044
    • Reward points : 0
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 13:28:24 (permalink)
    0
    I believe these are taken to a connector on the PIM for the explorer16 board and that you can purchase an adapter for the MPLAB RealICE to use these for debugging.

    Mike
    #4
    DaytonaFiend
    Administrator
    • Total Posts : 138
    • Reward points : 0
    • Joined: 2007/11/10 10:54:30
    • Location: Microchip Technology
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 14:52:50 (permalink)
    0
    Heya,
      The Explorer16 board has a JTAG connector as mike has spotted. However the RealICE does not use JTAG as its communications mechanism, using instead the standard ICSP protocol (speeded up somewhat). PIC32 can use both as a means of programming and debug but the JTAG debug is not supported as an independent interface by current Microchip tools.
    So you'd probably need to go to a third party such as Green Hills or Ashling to get a suitable JTAG tool.
    The header that can be seen on the PIM modules for PIC32 is to allow a trace interface to RealICE.
     
    ...DF
     
    #5
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 16:21:22 (permalink)
    0
    The starter kit user guide hints that it might support JTAG later with the updated 18LF4550 fimware (right now only firmware update).

    But that has been said for the Explorer 16 demo board about 2 years ago and now it is still in the air. For the dsPIC33/PIC24 on Explorer 16, even the firmware updating function is not implemented. So at least it looks slightly better for the PIC32.

    It can be done. Microchip just needs to invest a bit more on the USB firmware resources!!!
    #6
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 16:26:30 (permalink)
    0
    As far as I think, to make PIC32 a success, a cheap JTAG programmer/debugger is essential. I believe PICkit 2 can be a good programmer for PIC32. So the only thing left is JTAG debugger. A command line debugger based on gdb (it can be built as shown in the thread http://forum.microchip.com/tm.aspx?m=292995) will be even sweeter.

    Take note those GNU ARM GCC tools support cheap JTAG debugger/programmer like Wiggler or cheaper USB JTAG debugger like those from Olimex. TI MSP430, Atmel AVR and Silicon Labs C8051F also have relatively cheap JTAG debugger.

    I am not impressed with the speed of ICD2 when debugging dsPIC33/PIC24 so I will not think ICD2 is the answer here.
    #7
    threedogs
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2007/11/13 17:08:04
    • Location: 0
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 16:56:57 (permalink)
    0
    I think the Starter Kit might use JTAG already.  The Starter Kit User’s Guide in the USB Connectivity section says:  “The PIC32MX Starter Kit currently uses the JTAG pins of the PIC32MX device for programming and debugging.”wink
    #8
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 18:13:32 (permalink)
    0
    ORIGINAL: threedogs

    I think the Starter Kit might use JTAG already.  The Starter Kit User’s Guide in the USB Connectivity section says:  “The PIC32MX Starter Kit currently uses the JTAG pins of the PIC32MX device for programming and debugging.”wink

     
    The user guide is a bit confusing since it says we need to to the following to program the device.
    "select Debugger>Select Tool>PIC32MX Starter Kit from the menu bar".
     
    However, I believe 4.2.3 tells the real story.
     
    4.2.3 USB Connectivity
    The PIC32MX Starter Kit includes a PIC18LF4550 USB microcontroller, which provides
    both USB connectivity and support for protocol translation. The PIC18LF4550 is hardwired
    to the PIC32MX device to provide two types of connectivity:
    • I/O pins of PIC18LF4550 to ICSP™ pins of PIC32MX
    • I/O pins of PIC18LF4550 to JTAG pins of PIC32MX
    The PIC32MX Starter Kit currently uses the JTAG pins of the PIC32MX device for
    programming and debugging. At the time of initial release, the PIC18LF4550 is loaded
    with USB bootloader firmware, which permits easy upgrades of connectivity firmware
    over the USB connection.
    #9
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: PIC32 JTAG 2007/11/14 18:16:13 (permalink)
    0
    But I do not have the starter kit since I intend to buy the PIM module for my Explorer 16 demo board. It is a better investement if you have got the Explorer 16 demo board.
    Reference: http://forum.microchip.com/tm.aspx?m=293191
    #10
    drazen
    Super Member
    • Total Posts : 2847
    • Reward points : 0
    • Joined: 2003/11/07 12:43:09
    • Location: Croatia
    • Status: offline
    RE: PIC32 JTAG 2007/11/15 01:34:12 (permalink)
    0
    While I'am waiting for my board to come one question.
    Is it possible to use any JTAG debugger with PIC32 (I have one for TI DSPs)?
    #11
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: PIC32 JTAG 2007/11/15 01:43:07 (permalink)
    0
    ORIGINAL: drazen

    While I'am waiting for my board to come one question.
    Is it possible to use any JTAG debugger with PIC32 (I have one for TI DSPs)?

     
    I believe there are no universal JTAG debugger (or programmer) for MCUs. We have JTAG debuggers for ARM7 (J-Link), Silicon C8051 and TI MSP430, none of them are compatible. All the vendors all seem to use their own proprietary protocol.
     
    Actually even with the same MCU familiy, different JTAG debuggers are not really compatible with each other. For example, you can only use U-Link within Keil uVision for ARM target.
     
    #12
    DaytonaFiend
    Administrator
    • Total Posts : 138
    • Reward points : 0
    • Joined: 2007/11/10 10:54:30
    • Location: Microchip Technology
    • Status: offline
    RE: PIC32 JTAG 2007/11/15 02:08:44 (permalink)
    0
    Hi xiaofan

    DaytonaFiend..
    Heya,
    The Explorer16 board has a JTAG connector as mike has spotted. However the RealICE does not use JTAG as its communications mechanism, using instead the standard ICSP protocol (speeded up somewhat). PIC32 can use both as a means of programming and debug but the JTAG debug is not supported as an independent interface by current Microchip tools.

    That was what I was hinting at wink. Internally the starter kit can use JTAG to program and debug the PIC32 however those pins are not currently exposed or used by any of the existing Microchip tools as a separate interface.
    But I believe your later post is more to the point. IMHO the cheap JTAG wigglers are exactly that. Once your debug requirements get a little bit more sophisticated then you need a part/family specific JTAG tool to do the debug. In that case what is the problem with just using a different style of debug tool (such as RealICE) to achieve the same result.
    The speed of ICD2 is hampered by the PC and the hardware in it. If you need high speed debug with loads of capability then I would take a look at RealICE. The download speed alone is 20 times faster than ICD2.
     
    Have fun...
       DF...
     
    #13
    Kiwi Mike AZ
    Super Member
    • Total Posts : 2044
    • Reward points : 0
    • Status: offline
    RE: PIC32 JTAG 2007/11/15 03:37:19 (permalink)
    0
    Microchip does supply a Trace Kit to allow the RealICE to interface to the PIC32 PIM that has the JTag/Trace Connector expsed on the top


    Part Number: AC244006  - MPLAB REAL ICE TRACE INTERFACE BOARD KIT
    Found at....

    http://www.microchipdirect.com/productsearch.aspx?Keywords=PIC32

    Bit expensive for what it looks like!

    You could probably make one for a few dollars, just a polorized adapter board and a ribbon cable.
    post edited by mimemike - 2007/11/15 03:39:22
    #14
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: PIC32 JTAG 2007/11/15 16:45:34 (permalink)
    0
    I will of course buy the Real-ICE if I use PIC32 at work. But I think it is still good to get the JTAG firmware working for the starter kit and the Explorer 16 demo board.

    There are many demo boards out their with on board debugging/programming capability. For example, TI offers toolstick for their MSP430 with both programming and debugging capability. Silabs does the same with an on board USB MCU as the JTAG/C2 debug/program interface. ST is doing similar things for their Cortex M3 based STM32 Primer (http://www.stm32circle.com/hom/index.php, very cool gadget. I wish Microchip could make one based on PIC32).
    #15
    Neiwiertz
    Super Member
    • Total Posts : 2094
    • Reward points : 0
    • Joined: 2004/09/01 02:58:52
    • Status: offline
    RE: PIC32 JTAG 2007/11/16 05:23:31 (permalink)
    0
    The starter kit user guide hints that it might support JTAG later with the updated 18LF4550 fimware (right now only firmware update).
    Ok that does explain what i was looking for a while. (I also noticed that two pins of this LF are connected hardwired without any resistor in between so this confirms that this has a special purpose to be used for).

    About JTAG i think maybe this project can be suitetable or a start for a low cost interface. I asked Elektor if this project could be used for microchip dspic but had not a reply received therefore it would be wonderfull if somebody could shine a light on this. Here is the link to the Elektor project:
    http://www.elektor.com/magazines/2007/may/universal-jtag-adaptor.91541.lynkx

    Regards
    #16
    Tom Myers
    Super Member
    • Total Posts : 444
    • Reward points : 0
    • Joined: 2003/11/07 12:37:50
    • Status: offline
    RE: PIC32 JTAG 2007/12/31 09:18:03 (permalink)
    0
    Hi,
     
    I want to use JTAG as a BIST (built in self test) mechanism and truely use it in boundary scanning system wide - I presume this is even more way off than using JTAG as a one on one bebugger?
     
    Regards,
    Tom
    #17
    Kiwi Mike AZ
    Super Member
    • Total Posts : 2044
    • Reward points : 0
    • Status: offline
    RE: PIC32 JTAG 2007/12/31 13:15:11 (permalink)
    0
    Microchip does supply a Trace Kit to allow the RealICE to interface to the PIC32 PIM that has the JTag/Trace Connector expsed on the top

    Note: on top is a TRACE port only.

    The JTAG is quite seperate (Just added JTAG to two prototyping boards.


    I want to use JTAG as a BIST (built in self test) mechanism and truely use it in boundary scanning system wide - I presume this is even more way off than using JTAG as a one on one bebugger?


    For Boundary scanning, it is wired different to the one-on-one debugging if you have more than one JTAG device on the board.
    Basically Daisy chain the chips together (Data out connected to data in on the next chip).

    Mike

     
    #18
    Tom Myers
    Super Member
    • Total Posts : 444
    • Reward points : 0
    • Joined: 2003/11/07 12:37:50
    • Status: offline
    RE: PIC32 JTAG 2008/01/01 09:42:26 (permalink)
    0
    Thanks mimemike,
     
    Just to clarify, boundary scanning is possible using the PIC's which support JTAG - so long as I wire then in the usual daisy chain way like in any other boundary scanning app?
     
    The datasheet for the PIC's which support JTAG do not have any information on using it, they say this will be avaliable in future releases. Where can I obtain the information of how JTAG is implemented in the PIC? for example, how the boundary scan cells are connected internally?
     
    Regards,
    Tom
    #19
    libor
    Starting Member
    • Total Posts : 68
    • Reward points : 0
    • Joined: 2003/11/07 12:48:45
    • Location: Hungary
    • Status: offline
    RE: PIC32 JTAG 2008/01/02 08:40:47 (permalink)
    0
    Sorry for the possibly obvious question.  (yes, I have googled for it, but still not clear)

    Are JTAG tools all the same ?
    Is JTAG a standard (I think yes)  I have seen many, with different connectors, even with various pin counts (so it is not a standard ?)

    My particular question: I have a JTAG programmer (USB version) made by Olimex (sold for programming/ debugging MSP430 (TI) chips according to their website)
    Is this tool compatible with all JTAG tools ?   Can it (will it be able) to debug/scan/program PIC32s ?
     
    or is it the PC interface what makes the difference, so I will not be able to find a PC program (IDE) to use it with Microchip chips ?
    post edited by libor - 2008/01/02 08:42:35
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5