Thanks for your reply Dominic.
Some comments included below.
> Hello Bruce,
>
> On Friday 24 March 2006 01:32, Bruce Paterson wrote:
> > Hi Jim,
> >
> > Just attempted to get OpenOCD going using the new bits of your
> > tutorial so thought you might like some feedback.
> > Any experts on Chameleon with OpenOCD also appreciated (it's not
> > working....) !
> >
> > 1/ You make no mention of the need to also install the DX22 FTDI
> > drivers. According to the OpenOCD wiki you can use
> --disable-"whatever"
> > with openocd but it isn't clear if this is for configure, making or
> > running (my guess is configure ?). Anyway I couldn't seem to get
> > around needing the DLL to use openocd.exe version as
> specified. Since
> > I didn't actully have an FTDI to plug into a USB port to
> kick off the
> > recommeded Windows Add-New-Hardware procedure, I simply
> copied the dll
> > file from the downloaded driver zip to c:\windows. That got
> rid of that error !
> >
> I supposed you've downloaded the
> preview-cygwin-ftd2xx-20060213 release. This one has been
> prebuilt for use with the FT2232. If you don't have such a
> device, you should have used preview-cygwin-20060213.
> Please note that these versions are rather outdated, and many
> things have been fixed since mid-february.
> It's probably best to get the current sources from svn:
> svn checkout http://svn.berlios.de/svnroot/repos/openocd/
> or use the graphical svn client of your choice.
> In current versions, the ./configure options have been
> changed to opt-in, i.e.
> you have to --enable-XXX the interfaces you want.
Ah so the wiki refers to the SVN version ! That was the bit if
information I was missing. Might be worth while mentioning in the wiki
what version your instructions refer to, to avoid future confusion.
Now, before I spend some time getting doing my own windows based build
on the latest SVN version (pain!), can you tell me whether there are any
show stoppers in the mid-feb cygwin version(s) that will stop them
working ? (ie could cause an erroneous "Error validating JTAG scan
chain" error ?). I know it's always best to use the latest and greatest,
but I also don't want to go barking up the wrong tree.
> Build instructions and usage notes are available at the
> OpenFacts Wiki:
> http://openfacts.berlios.de/index-en.phtml?title=Open_On-Chip_Debugger
> Let me know if you're missing something, or if something is unclear.
Just the version that instructions refer to (as noted above), and that
the --disable-'options' refer to configure. I've got it now, but others
may stumble down the wrong path too :)
> > 2/ I got errors about not being able to find cygwin1.dll,
> even though
> > c:/cygwin/bin is in my path. I've got around this by running from a
> > cygwin bash shell rather than a DOS prompt. Not sure how I tell
> > Windows the DLL search paths. Have I missed a step somewhere ?
> >
> Haven't experienced this problem yet, but then I rarely test
> on Windows. Maybe someone else is more knowledgeable as far
> as Cygwin is concerned.
I can put up with running from a cygwin shell for now. Perhaps mention
this in the wiki till someone provides some better info.
> > 2/ I added the ioperm -i to run everytime I start
> debugging. Harmless
> > if already installed. Just one less thing to go
> wrong/forget. I note
> > that WinARM uses giveio instead to allow user level access,
> but that
> > was an older openocd version.
> >
> I'm considering adding GiveIO to the OpenOCD, together with
> changes that allow OpenOCD to be built for native-windows,
> i.e. without Cygwin. I'm still undecided whether that's worth
> the trouble of additional code and build management complexity.
I don't mind running with administrator privileges for now, so though
giveio would be nice it's not my highest priority. Windows native also
nice, but running from a cygwin shell is also not a huge burden. As long
as the tutorial and/or wiki says that's what I need to do. (Documenting
these particular issues is more important for me at this stage than
fixing them).
> > 3/ I wrote my chameleon.cfg file for openocd using Dominic's wiki.
> > Unfortunately, the openocd version compiled for cygwin
> doesn't seem to
> > have some of the options given in the wiki. 'daemon startup' isn't
> > supported, nor the arm7tdmi reset option "run_and_halt".
> I'll attach
> > the file below for reference.
> >
> The "chameleon.cfg" included in doc/configs/ is for
> configuring the chameleon (OpenOCD can be used to program the
> .amtsvf files), not for use of the chameleon with an ARM target.
I realised that. My chameleon.cfg file is not that file. I'll include
the text of my one as I'm not sure attachments work on this list:
------------------------------------------
#daemon configuration
telnet_port 4444
gdb_port 3333
#daemon_startup reset <--- commented out for now as not in this version
#interface
interface amt_jtagaccel
parport_port 0x378
jtag_speed 4
target arm7tdmi little reset_halt 0
#jtag scan chain
# format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask,
IDCODE)
jtag_device 4 0x01 0xf 0x01
------------------------------------------
I believe it matches what you said, but I'm not certain about the jtag
scan chain.
> > 4/ Worst of all, I couldn't actually get the thing to work :( Just
> > got a JTAG chain error. I tried various JTAG delay
> settings. Since I'm
> > attempting the Chameleon Accelerator (I believe I do have
> my port set
> > to EPP mode) , I should possibly also backtrack and try very basic
> > wiggler mode (reprogram the chameleon). I have in the past
> used this
> > PC with ocdremote and the Chameleon in Raven mode though,
> but it was a
> > bit dodgy. Suggestions welcome !
> >
> A JTAG chain error ( , IR
> mismatch) suggests that you're using a wrong configuration
> file (see above). The OpenOCD verifies that the connected
> devices match the description of the jtag_device entries from
> the config files.
Dang, I *think* I've got all that right.
The only things I can think of are:
1/ The mid-feb version of openocd (with ftdi) has bugs that give this
error when it shouldn't.
2/ I have the jtag scan setup config wrong for an LPC2124
3/ I'm not in the right EPP mode (but I think I tried them all! Should
I use 1.7 or 1.9 ?)
4/ My parallel port cable is too long
5/ The Amontec is misprogrammed somehow (but it claims to have "Program
OK" with the "amontec_jtag_accelerator_051211.amtsvf" file.
Any ideas ?
> In your case, use EPP and SPP. The one thing you shouldn't
> use is ECP, as it's often not possible to switch to EPP from
> ECP (and OpenOCD doesn't attempt to do that switch, either ;))
OK Ta. I'll assume (EPP1.9 & SPP) is the best setting unless told
otherwise.
Again thanks for your feedback. It helps to know I'm basically on the
right track. It is tempting to setup a linux box just for debugging.
Maybe.
Cheers,
Bruce