mspdebug and olimex-v1

Hardy Griech <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <[email protected]>
Hi,

I've encountered problems reading data from the target with an olimex-v1 
FET.  Writing was ok.

Turned out (hopefully), that in cp210x.c/usbtr_recv() the function 
usb_bulk_read() may legally return 0.

Modifying the code to:

do {
         rlen = usb_bulk_read(tr->handle, V1_IN_EP, (char *)databuf,
                              max_len, TIMEOUT);

#ifdef DEBUG_CP210X
         printc(__FILE__": %s : read %d\n", __FUNCTION__, rlen);
#endif

} while (rlen == 0);

solved my problem.

Should I submit a patch or is it ok in this way?

Hardy


PS: this at least holds true for windows/cygwin

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.