|
From: Strontium <str...@gm...> - 2009-09-11 16:01:27
|
Hi all. I know that OpenOCD contains support code for PIC 32. But TinCanTools say the following: > Please note that since this JTAG adapter board is intended for use > with a MIPS CPU, OpenOCD cannot be used with this adapter board. > OpenOCD does not support MIPS processors. This is clearly not correct, because I can connect to my PIC32 USB Starter Board (Through the JTAG interface on the IO Expansion Board) Using their MIPS header and get some semblance of a sensible reply. Using a fresh OpenOCD checkout from head (as of an hour ago). The problem I get is, after I connect, the flyswatter flashes LED2 and LED3 alternately for a while and then crashes out. This is my first attempt at using OpenOCD on PIC32 so I don't know if another version works better with it or not. Anyway Here is the Message output: > Open On-Chip Debugger 0.3.0-in-development (2009-09-11-20:28) svn:2694 > $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ > For bug reports, read > http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS > jtag_nsrst_delay: 100 > jtag_ntrst_delay: 100 > Info : clock speed 6000 kHz > Info : JTAG tap: pic32mx.cpu tap/device found: 0x50978053 (mfg: 0x029, > part: 0x0978, ver: 0x5) > Info : device id = 0x50978053 (manuf 0x029 dev 0x78, ver 0x509) > Info : flash size = 512kbytes > flash 'pic32mx' found at 0xbd000000 > Info : device id = 0x50978053 (manuf 0x029 dev 0x78, ver 0x509) > Info : flash size = 12kbytes > flash 'pic32mx' found at 0xbfc00000 > Open On-Chip Debugger 0.3.0-in-development (2009-09-11-20:28) svn:2694 > TargetName Type Endian TapName State > -- ------------------ ---------- ------ ------------------ ------------ > 0* pic32mx.cpu mips_m4k little pic32mx.cpu running Sometimes it will stop here and flash the leds for ever, other times it flashes them for a while (many seconds) and then crashes and outputs: > Error: couldn't read the requested number of bytes from FT2232 device > (0 < 5) > Error: couldn't read from FT2232 > Error: register read failed > Error: couldn't read the requested number of bytes from FT2232 device > (0 < 5) > Error: couldn't read from FT2232 > Error: register read failed > Error: ftdi_read_data: usb bulk read failed > Error: couldn't read from FT2232 > Error: register read failed > Error: ftdi_write_data: usb bulk write failed Here is my target script: > # Change this to point to your particular interface > source [find interface/flyswatter.cfg] > > set CPUTAPID 0x50978053 > source [find target/pic32mx.cfg] > > init > flash probe 0 > flash probe 1 > version > targets pic32mx.cfg is stock, as checked out from SVN, with the small exception that I changed these lines in it to suppress a warning: > > flash bank pic32mx 0xbd000000 0 0 0 0 > flash bank pic32mx 0xbfc00000 0 0 0 0 changed to: > flash bank pic32mx 0xbd000000 0 0 0 $_TARGETNAME > flash bank pic32mx 0xbfc00000 0 0 0 $_TARGETNAME Any suggestions to get to the point where I can connect with Telnet or GDB would be greatly appreciated as I am a bit snookered at the moment. Editing those lines neither improved or made the situation I experience any worse. Thanks, Strontium |
|
From: Spencer O. <sp...@sp...> - 2009-09-11 16:39:00
|
> > I know that OpenOCD contains support code for PIC 32. But > TinCanTools > say the following: > > > Please note that since this JTAG adapter board is intended for use > > with a MIPS CPU, OpenOCD cannot be used with this adapter board. > > OpenOCD does not support MIPS processors. > > This is clearly not correct, because I can connect to my PIC32 USB > Starter Board (Through the JTAG interface on the IO Expansion Board) > Using their MIPS header and get some semblance of a sensible reply. > That adapter should work fine, have not tried personally though. > Using a fresh OpenOCD checkout from head (as of an hour ago). The > problem I get is, after I connect, the flyswatter flashes > LED2 and LED3 > alternately for a while and then crashes out. This is my > first attempt > at using OpenOCD on PIC32 so I don't know if another version works > better with it or not. > SVN head is working fine for me on PIC32 - using Explorer16. Most of the important stuff is being detected correctly, first suggestion would be a full log openocd -d3 will give lots more info. Cheers Spen |
|
From: Strontium <str...@gm...> - 2009-09-12 19:51:26
|
Thanks for the replies. Ok, I CAN connect to OpenOCD with Telnet, it threw me because I expected to see messages like: > *Warning:no telnet port specified, using default port 4444 > Warning:no gdb port specified, using default port 3333 > Warning:no tcl port specified, using default port 6666* But I don't... I guess these messages don't exist any more? I can connect with telnet to port 4444, and then if i just enter HALT and provided the flyswatter doesn't reset itself it seems to work fine so far. I had a problem with the Flyswatter once before resetting on me all the time and I suspected it was my USB cable. I haven't used it for a while but it seems to be doing it now again, which is why I am getting failed comms. Does anyone else have problems with flyswatters spuriously resetting themselves??? I threw out my suspect USB cable and this is a new one which I thought had solved my problem, but it is as unreliable as ever now. I wonder if it would be possible to harden OpenOCD against flyswatter resets so when it happens the connection to the flyswatter can be re-established without loosing debug state to the target. >> Using a fresh OpenOCD checkout from head (as of an hour ago). The >> problem I get is, after I connect, the flyswatter flashes >> LED2 and LED3 >> alternately for a while and then crashes out. This is my >> first attempt >> at using OpenOCD on PIC32 so I don't know if another version works >> better with it or not. >> >> > > SVN head is working fine for me on PIC32 - using Explorer16. > Most of the important stuff is being detected correctly, first suggestion > would be a full log > openocd -d3 will give lots more info. > > Cheers > Spen > > |
|
From: David B. <da...@pa...> - 2009-09-12 20:33:30
|
On Saturday 12 September 2009, Strontium wrote: > I expected to see messages like: > > > Warning:no telnet port specified, using default port 4444 > > Warning:no gdb port specified, using default port 3333 > > Warning:no tcl port specified, using default port 6666 > > But I don't... I guess these messages don't exist any more? Not in current code; they never added value (just noise). |
|
From: David B. <da...@pa...> - 2009-09-11 17:20:02
|
On Friday 11 September 2009, Strontium wrote: > I know that OpenOCD contains support code for PIC 32. But TinCanTools > say the following: > > > Please note that since this JTAG adapter board is intended for use > > with a MIPS CPU, OpenOCD cannot be used with this adapter board. > > OpenOCD does not support MIPS processors. > > This is clearly not correct, because I can connect to my PIC32 USB > Starter Board (Through the JTAG interface on the IO Expansion Board) > Using their MIPS header and get some semblance of a sensible reply. Don't forget to ask TinCanTools to correct their docs ... |