This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Programming and Debugging Facilities for Production Product

Other Parts Discussed in Thread: SEGGER

Hi,

I've been developing a product using a development board. I've breadboarded all the hardware I need and drawn up most of the electrical schematics. Most of it has been straightforward, but now I have a roadblock. I need to include a programming method (essential), would like to have debugging capability (very nice to have) and need to continue having the virtual comm port available (essential).

Basically, I would like to implement an In-Circuit Debug Interface (ICDI). That is, just as I have on the current breadboard version using the development board.

The problem is, there is no guidance on how to implement an ICDI.

What do people do when they switch from a TI development board to a final production product? This has got to be a consideration for any production product and have been done hundreds of times on the planet!

Thanks and Regards, Vito

  • Vito,

    Did you find a solution to this? I have hit the same roadblock. I was going to add a connector for an XDS200 probe, but it doesn't support the virtual comm port (that I can see). I really don't want to add another TM4C123G micro just to get this functionality.

    Jeff

  • Vito and Jeff,

    Use a Tiva Launchpad as an off-board emulator.  This also gives you the virtual COM support also.

    http://processors.wiki.ti.com/index.php/Stellaris_LM4F120_LaunchPad_Debug_How_To

  • @ Michael S.,

    Might both posters here seek a solution - "Which can be fully implemented upon/within their production boards?"  Should that prove the case - any external board - even heralded launchpad - may be problematic...

  • Why not just use the JTAG interface and the standard Cortex JTAG header?  That's what is is for. 

    Simple and inexpensive for the board and easy to access and program with a standard JTAG adapter.

    Robert

  • I need to have the virtual serial port, which the XDS200 does not support (please correct me if I an wrong about this).

    Jeff

  • @cb1

    This is essentially a duplicate thread for http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/309564.aspx.  This has already been answered.

    Jeff,

    You're correct.

    http://emulators.spectrumdigital.com/files/XDS200_QSG.pdf

  • And - should a, "No external board," programming/debug/virtual Com Port solution be the objective - perhaps one of FTDI's (the original ICDI chip supplier, here) "CABLE-ONLY - ICDI Solutions," may warrant consideration.

    Those functions requested - appear fully contained w/in that cable/connector - there is no extra board - and importantly - no additional (and precise) hook-up demanded.  (and - this solution does not have to be, "specially handled/modified" which is the fate of any/all launchpads, "pressed into such unnatural JTAG service..."

    Launch - in this particular instance - is a relatively inaccurate (i.e. marketing >> engineering) descriptor.  (i.e. "launch" only after time, parts, interconnect & assembly are added!) 

  • Michael S said:
    This has already been answered.

    Not that this reporter can tell - and surely not to the satisfaction of o.p. and/or follow-on ones...   May I ask why you believe this to have been answered, Michael?

    Let the record show - that NO Green Verify flag yet flies (this date/time) - Michael's referenced thread - and is not that the "normal/customary" means by which a post has been, "well answered?"  As always - devil in such details...

  • Jeff McDevitt said:

    I need to have the virtual serial port, which the XDS200 does not support (please correct me if I an wrong about this).

     
    I have no idea, I don't use it.  Worth asking the developer. It is part of the Cortex definition.
     
    Segger's Jlink claims some support but I've not had need to use it so I can't testify to it's presence or how good it is. There are a number of other JTAG/SWD/SWO devices out there to check. (Just checked here's info on Segger's version for the Jlink http://www.segger.com/j-link-swo-viewer.html)
     
    However, I expect the cost of developing an ICD, would more than cover the cost of even an expensive JTAG interface.  Provided it is a quality tool buying the right tool is almost always cheaper than trying to work around it.
     
    The caveat is important :)
     
    Robert
  • cb1_mobile said:

    This has already been answered.

    Not that this reporter can tell - and surely not to the satisfaction of o.p. and/or follow-on ones...   May I ask why you believe this to have been answered, Michael?

    Let the record show - that NO Green Verify flag flies - Michael's referenced thread - and is not that the "normal/customary" means by which a post has been, "well answered."  As always - devil in such details...

    [/quote]

    3rd post by Janos in the thread at http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/309564.aspx points to a thread at http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/216275.aspx.  Third and fourth posts answer the question at hand.

  • @ Robert,

    By my read (and 2nd read, as well) both posters may have wanted all such capability, "upon/within" their production board.  Thus - suggestion of simple JTAG/SWD header (which is exactly what our firm employs) may not fully satisfy their objectives.

    Original poster especially - seemed to seek "near duplicate behavior/capability" as presented by launchpad - with its two MCUs - one serving as "on-board" ICDI & Com Port.  Further doubt that JTAG header satisfies that Com Port requirement...

  • Michael S said:

    3rd post by Janos in the thread at http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/309564.aspx points to a thread at http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/216275.aspx.  Third and fourth posts answer the question at hand.

    Michael, REALLY?  It was that direct - that xtal clear! 

    Green flag's absence likely conveys the "imperfection" of such a, "chase!" 

    Camouflaging "guidance/answers" may not do much to reverse the recent misfortune which has inflicted your embedded community...  Sales are boosted by, "Comfort & Convenience" - both far absent via this indirection....

  • cb1_mobile said:

    Original poster especially - seemed to seek "near duplicate behavior/capability" as presented by launchpad - with its two MCUs - one serving as "on-board" ICDI & Com Port.  Further doubt that JTAG header satisfies that Com Port requirement...

    Actually, I think it does.  To the exent I've seen ICDs on the eval boards they just provide a link to the main processors JTAG port.  The serial port functionality is part of the JTAG (technically it's part of the SWD interface).  That doesn't provide a serial in AFAIK but it does provide a serial out.  To provide a serial in as well would require more pins from the main processor.

    I think the ICDs on the eval boards only save you from purchasing a "proper" JTAG.  I don't think they offer any additional functionality.

    Robert

  • @ Robert,

    Under SWD - an SWO (output only) signal may be, "massaged out."  However - I can't see how this, "output only" could possibly rise to the full/proper functionality of poster's sought, "Virtual COM Port!"  Can you, Robert?

    Apologies to original poster & 2nd requester - again the desire for full, unambiguous specification - plays out again, this space...

  • cb1_mobile said:

    @ Robert,

    Under SWD - an SWO (output only) signal may be, "massaged out."  However - I can't see how this, "output only" could possibly rise to the full/proper functionality of poster's sought, "Virtual COM Port!"  Can you, Robert?

     
    It's what the ICD's do and the massaging is built in to the SWD macro block implentation.  There are specific debug_print type function in the tool chains that write to this virtual serial port. It's up to the debugging SW to put the serial stream on some sort of viewable terminal.
     
    I agree, it's not really what I would consider a full fledged com port but it wouldn't be the first time I've run across an output only com port.  A lot of the references do refer to it as a virtual serial port. 
     
    I don't think the ICDs act as anything more than a JTAG/SWD interface (and that is what they are advertised as, replacing the need for an external JTAG adapter).
     
    Robert
  • Robert,

    Do you know if this is true for the XDS200? When I connect it to my PC is see two Serial Port entries in the Device Manager. Do you know what the print statement would be? 

    Thanks,

    Jeff

  • Hi all, 

    After almost three days without hearing anything on this topic I though it was dead. Then overnight while I splet there are 16 replies. Wow.

    Thanks to Jeff, Michael, cb1 and Robert for your input. It's great to see discussion on what I think is an important topic for anyone who wants to go beyond development on a development board and produce a product.

    Jeff, of all the technical solutions I've heard of so far, the best solution is adding a TM4C123G (64 pin) to your design. It sounds expensive to add another microcontroller just to provide the ICDI functionality, but it's mainly physiologicalPeople would spend the same amount on a FTDI chip if it could be done with just one chip. The Tiva Launchpad, which sells for $12~$13 has two micros and so do others such as mbed. It sounds expensive, but it's the best current technical solution. I say the best technical solution since TI will not release the source or binary code.

    Michael, using a Tiva LaunchPad as off-board emulator does not work. The reason is that I would need to open my product up to access the internal JTAG connector (or worse still, add an external JTAG connector) and would still need to provide the USB device functionality some other way. So the Tiva LauchPad is a good solution while prototyping, but it's not a good fit for the final product.

    cb1, spot on. We need the full ICDI facilities (software download, debugging and comm port), off a USB device connector. You've read this well. Thanks for pointing this out while I slept.

    Robert, as already said, the JTAG interface is internal and I still want the USB device functionality for the product's use. This is one of my comms interfaces for the product (I have USB, Ethernet and RS232 (that should cover 99.9% of comms port use cases!) - as well as a USB Host for data logging onto a USB memory stick)

    After not hearing any replies for a couple of days I went ahead and did the only possible solution for my requirement; I copied the circuit on page 31 of the LM3S9D96 User's Manual ( http://www.ti.com/lit/ug/spmu175/spmu175.pdf ). I also had to add two multiplexer chips since I have two microcontrollers in my design. So, all up 7 IC's to provide JTAG, SWD and a USB Device port (that has good software support with commands such as UARTprinf).

    ---------

    This is not a duplicate of http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/309564.aspx (Implementing an In-Circuit Debug Interface (ICDI) for a Tiva based product), which was also posted by me. That was initiated about 5 weeks ago since that is what I wanted to do. However, when there were no solutions in that space I asked this broader question regarding how do people get the required software download/debugging and virtual comm port functionality if not by using an ICDI. In other words, other people must have crossed this bridge, how did they do it. Janos suggested that the solution is that "the source code and not even the binary images of the ICDI are meant to go public". However I had to reject the proposed solution (sorry Janos) since it is not a solution.

    ---------

    In summary, I had to move on so I copied the ICDI circuitry from the EK-LM3S9D96 board. If someone comes up with a more elegant solutionplease let me know. Personally, I think TI should provide a complete solution to this developer need. If TI wants to regain developer confidence/support following the Stellaris NRND debacle, releasing a ready-to-implement ICDI would be a great move.

    Regards, Vito

  • I have no idea about the XDS200, you will have to check.  It's also partly a function of the SW you use with it.  I know the JLink has an independent viewer so it's not necessary to run the debugger just to get serial output.

    As far as the print goes, Segger has an example with their literature on the viewer.  It's nice and short, so it should easy to test.  I have not used it.  IAR links a different library and in that config redirects stdout and stderr to the SWO out.  I have seen debug_Printf used on another product but I don't recall now which one.

    This would actually be a good addition to the TIVAWare library.

    Robert

     

  • @ Vito,

    Well written (again), Sir.  Great detail - you powerfully & effectively documented the fact that such capability provides much needed flexibility - and enhances end-product functionality & value.

    One hopes that this vendor takes your clear, compelling request to heart...  You've surely done, "your part" to encourage - your effort very much appreciated...

  • Thanks for your kind words cb1.

    Let's hope TI considers adding a reference design for an ICDI for the Tiva microcontrollers, which would be a great marketing move.