EmbeddedRelated.com
Forums
Memfault State of IoT Report

MSP430 JTAG over USB for Linux?

Started by Michael N. Moran September 27, 2007
I recently acquired a new laptop, which (of course)
has no parallel port.

I've been looking into MSP430F169 board from Olimex
to use in a prototyping/testing situation for an
FPGA.

I'm impressed with the MSP430 line, but I'd like to
be able to do the device programming and debugging
from my usual Linux development environment.

Both TI and Olimex make USB->JTAG programmers/debuggers
for the MSP430, but based on my googling, there
doesn't seem to be any Linux support for these.

Someone please tell me I'm wrong!

-- 
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
Kennesaw, GA, USA 30144    http://mnmoran.org

"So often times it happens, that we live our lives in chains
  and we never even know we have the key."
"Already Gone" by Jack Tempchin (recorded by The Eagles)

The Beatles were wrong: 1 & 1 & 1 is 1
On 2007-09-27, Michael N. Moran <mnmoran@bellsouth.net> wrote:

> I'm impressed with the MSP430 line, but I'd like to be able to > do the device programming and debugging from my usual Linux > development environment. > > Both TI and Olimex make USB->JTAG programmers/debuggers for > the MSP430, but based on my googling, there doesn't seem to be > any Linux support for these.
The TI ones (both the 6-wire JTAG and the 2-wire spy-bi-wire) work fine under Linux using msp430-gdbproxy. The parallel port JTAG widgets (both TI and Olimex) also work fine under Linux. If the Olimex USB widgets work with the TI .dll files under Windows, then I believe they'll work with msp430-gdbproxy under Linux as well. My understanding is that if Olimex has to provide custom .dll files for their USB widgets, then they won't work. Here's the definitive place for answers on gcc/gdb and the MSP430: http://sourceforge.net/mail/?group_id=42303 http://news.gmane.org/gmane.comp.hardware.texas-instruments.msp430.gcc.user If you want something commercial, there's Rowley CrossWorks: http://www.rowley.co.uk/msp430/ I believe the Rowley stuff comes with pre-setup demo projects for Olimex boards. -- Grant Edwards grante Yow! Is a tattoo real, like at a curb or a battleship? visi.com Or are we suffering in Safeway?
Grant Edwards wrote:
> On 2007-09-27, Michael N. Moran <mnmoran@bellsouth.net> > wrote: >> Both TI and Olimex make USB->JTAG programmers/debuggers >> for the MSP430, but based on my googling, there doesn't >> seem to be any Linux support for these. > > The TI ones (both the 6-wire JTAG and the 2-wire > spy-bi-wire) work fine under Linux using msp430-gdbproxy.
I've looked at the gdbproxy, but I'm having a hard time understanding exactly what it uses to talk to the USB JTAG device.
> If the Olimex USB widgets work with the TI .dll files > under Windows, then I believe they'll work with > msp430-gdbproxy under Linux as well. My understanding is > that if Olimex has to provide custom .dll files for their > USB widgets, then they won't work.
Sorry ... I'm old and confused, but don't the .dll libraries only run under Windows? Or is there some WINE stuff going on here?
> Here's the definitive place for answers on gcc/gdb and > the MSP430: > > http://sourceforge.net/mail/?group_id=42303
I've gone down this path, but the question "seems" un-answered.
> http://news.gmane.org/gmane.comp.hardware.texas-instruments.msp430.gcc.user
The best related thread that I found here was yours, Grant. :-) Sorry about being *thick*, but I just like to understand how these things work before I fork out the cash. thanks, mike -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." "Already Gone" by Jack Tempchin (recorded by The Eagles) The Beatles were wrong: 1 & 1 & 1 is 1
On Sep 28, 2:29 pm, "Michael N. Moran" <mnmo...@bellsouth.net> wrote:

> I've looked at the gdbproxy, but I'm having a hard time > understanding exactly what it uses to talk to the USB > JTAG device.
It uses closed proprietary code. That's the only way TI will allow their JTAG to be used. But it is free.
> Sorry ... I'm old and confused
join the club
> don't the .dll libraries only run under Windows? Or is there some WINE stuff going > on here?
No WINE, but if the low-level interface of the JTAG devices is close enough to the real TI JTAG devices, then the closed code I mentioned should work fine.
> The best related thread that I found here was yours, > Grant. :-)
Grant walks on water. He's one of the few truly smart people who doesn't mind stooping down to answer questions from all kinds of people. I don't know why this is getting more rare on the Internet but it's distressing.
> Sorry about being *thick*, but I just like to understand > how these things work before I fork out the cash.
The cash outlay can be very small. You can try out the software using a EZ430 USB dongle and the total outlay is around $20. They come with a built-in JTAG device that uses the smaller pin count Spy-bi-wire JTAG protocol. At least one guy on the net is selling little adapters to allow that JTAG device to be used with other msp430 devices that also support Spy- bi-wire. You only really need to buy a more expensive JTAG device if you want to use a member of the family that doesn't support Spy-bi- wire, or if you can leverage a corporate budget :-) Eric
On 2007-09-28, Michael N. Moran <mnmoran@bellsouth.net> wrote:
>> >>> Both TI and Olimex make USB->JTAG programmers/debuggers for >>> the MSP430, but based on my googling, there doesn't seem to be >>> any Linux support for these. >> >> The TI ones (both the 6-wire JTAG and the 2-wire >> spy-bi-wire) work fine under Linux using msp430-gdbproxy. > > I've looked at the gdbproxy, but I'm having a hard time > understanding exactly what it uses to talk to the USB > JTAG device.
A USB JTAG or spy-bi-wire adapter shows up as a serial port (e.g. /dev/ttyUSB0). It looks like they use a standard TI USB<->serial chip which is interfaced to an MSP430F16x which then talks to the target device (AFAICT).
>> If the Olimex USB widgets work with the TI .dll files under >> Windows, then I believe they'll work with msp430-gdbproxy >> under Linux as well. My understanding is that if Olimex has to >> provide custom .dll files for their USB widgets, then they >> won't work. > > Sorry ... I'm old and confused, but don't the .dll libraries > only run under Windows?
Right.
> Or is there some WINE stuff going on here?
No. You don't actually use the .dlls under Linux. It's just a handy way to tell if the off-brand USB debug adapters are drop-in replacements for the TI ones. If the vendor supplies their own .dll files along with the USB adapter, I believe that means they don't talk the same protocols as the TI ones and therefore won't work with gdbproxy. If the off-brand USB dongle will work with the TI .dll files, then it's protocol-compatible and will also work with gdbproxy. Quoting from the description of the Olimex MSP430-JTAG-ISO, JTAG-TINY and JTAG-RF: MSP430.dll makes it compatible with all existing software which works with TI-USB-FET (emulates TI-USB-FET) That leads me to believe that it's not compatible with the TI .dll's and therefore not compatible with gdbproxy under Linux. I might be wrong...
>> Here's the definitive place for answers on gcc/gdb and the >> MSP430: >> >> http://sourceforge.net/mail/?group_id=42303 > > I've gone down this path, but the question "seems" > un-answered.
There seems to have been a bit of confusion and misinformation in a few threads there lately. Steve Underwood is the maintainer of msp430-gdbproxy, so pay particular attention to his posts. Oleg Verych has been working on the Linux driver for the TI USB-serial chip, so also pay attention to whatever he says also. Support for USB stuff under Linux has been rather, um, "fluid". There were several different patches for getting the Linux USB-serial driver to recognize the ez430 spy-bi-wire widget, but it appears it's settling down. Recent Linux kernels (as of 2.6.22 at least) include a driver that works with the TI USB<->serial chip (though for the ez430 you need a hotplug script or udev rule to configure it after it's found). The current msp430-gdbproxy does support both styles of USB adapter (standard JTAG and spy-bi-wire).
> Sorry about being *thick*, but I just like to understand > how these things work before I fork out the cash.
No worries. It's taken me a fair while to figure it all out. If you want to do spy-bi-wire (used with the smaller target parts), you can probably get an ez430+2013 for free from your distributor. If you want to play with the larger parts which use standard JTAG, then I'm not aware of any free deals. The $15 parallel port JTAG widget from Olimex works great, but you need a real PC parallel port (I don't believe that the USB<->printer-port adapters work). -- Grant Edwards grante Yow! I'm ANN LANDERS!! at I can SHOPLIFT!! visi.com
Grant Edwards wrote:
> On 2007-09-28, Michael N. Moran <mnmoran@bellsouth.net> wrote: >> I've looked at the gdbproxy, but I'm having a hard time >> understanding exactly what it uses to talk to the USB >> JTAG device. > > A USB JTAG or spy-bi-wire adapter shows up as a serial port > (e.g. /dev/ttyUSB0). It looks like they use a standard TI > USB<->serial chip which is interfaced to an MSP430F16x which > then talks to the target device (AFAICT).
I gleaned this same information from the mspgcc/gdbproxy stuff on source forge ... by going through the docs and then downloading and looking at the driver code for FC4 and FC4. Thanks for the reenforcement :-)
> If the off-brand USB dongle will work with the TI .dll files, > then it's protocol-compatible and will also work with gdbproxy. > > Quoting from the description of the Olimex MSP430-JTAG-ISO, > JTAG-TINY and JTAG-RF: > > MSP430.dll makes it compatible with all existing software > which works with TI-USB-FET (emulates TI-USB-FET) > > That leads me to believe that it's not compatible with the TI > .dll's and therefore not compatible with gdbproxy under Linux. > I might be wrong...
They also say (in their FAQ) that users of mspgcc have "reported" success using the device ... without mentioning Linux :-/
> Steve Underwood is the > maintainer of msp430-gdbproxy, so pay particular attention to > his posts. Oleg Verych has been working on the Linux driver > for the TI USB-serial chip, so also pay attention to whatever > he says also.
Good information. Thank you, Grant, for your time and detail. -- Michael N. Moran (h) 770 516 7918 5009 Old Field Ct. (c) 678 521 5460 Kennesaw, GA, USA 30144 http://mnmoran.org "So often times it happens, that we live our lives in chains and we never even know we have the key." "Already Gone" by Jack Tempchin (recorded by The Eagles) The Beatles were wrong: 1 & 1 & 1 is 1

Memfault State of IoT Report