>>>>> "Jérôme" == Jérôme Carretero <[email protected]> writes:

    Jérôme> Hi all, First, sorry for posting on multiple lists, but I think
    Jérôme> this is appropriate in this case.

    Jérôme> Since I've used a second (still FT2232H-based) JTAG adapter I
    Jérôme> can see that the deadlocks that I experienced are not due to my
    Jérôme> original JTAG adapter.

Did you stress test the chain with xc3sprog -T ? While running, perhaps look
at the waveforms with a scope!

    Jérôme> Using libftd2xx 1.0.4 at the moment, but it's probably not an
    Jérôme> issue (more on that later).  I noticed that urjtag and OpenOCD
    Jérôme> have issues, don't know yet if it's related to FTDI cable or the
    Jérôme> JTAG chain (tested on 2 different ARM-based chains, same thing).

    Jérôme> xc3sprog always works fine after n invocations; let's run it a
    Jérôme> couple of times, just to print the JTAG chain:

Does that mean it doesn't work with the first invocation?


    Jérôme>    $ ~/dev/xc3sprog-git_svn/xc3sprog -c arm-usb-ocd-h -j
    Jérôme> XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux Free
    Jérôme> software: If you contribute nothing, expect nothing!  Feedback
    Jérôme> on success/failure/enhancement requests:
    Jérôme> http://sourceforge.net/mail/?group_id=170565 Check Sourceforge
    Jérôme> for updates: http://sourceforge.net/projects/xc3sprog/develop

    Jérôme>    Using Libftdi, JTAG loc.: 0 IDCODE: 0x1b7d102f Desc:
    Jérôme> OMAP-L138 Rev: A IR length: 6

    Jérôme>    $ ~/dev/xc3sprog-git_svn/xc3sprog -c arm-usb-ocd-h -j
    Jérôme> XC3SPROG (c) 2004-2011 xc3sprog project $Rev$ OS: Linux Free
    Jérôme> software: If you contribute nothing, expect nothing!  Feedback
    Jérôme> on success/failure/enhancement requests:
    Jérôme> http://sourceforge.net/mail/?group_id=170565 Check Sourceforge
    Jérôme> for updates: http://sourceforge.net/projects/xc3sprog/develop

    Jérôme>    Using Libftdi, JTAG loc.: 0 IDCODE: 0x1b7d102f Desc:
    Jérôme> OMAP-L138 Rev: A IR length: 6
   
    Jérôme>    $


    Jérôme> Now, let's say I want to run UrJTAG, it works once but not a
    Jérôme> second time:

    Jérôme>    $ echo -ne "cable ARM-USB-OCD-H\ndetect\n" |
    Jérôme> ~/opt/urjtag/bin/jtag Connected to libftd2xx driver.  IR length:
    Jérôme> 6 Chain length: 1 Device Id: 00011011011111010001000000101111
    Jérôme> (0x1B7D102F) Manufacturer: Texas Instruments (0x02F) Unknown
    Jérôme> part! (1011011111010001)
    Jérôme> (/home/cJ/opt/urjtag/share/urjtag/ti/PARTS) $ echo -ne "cable
    Jérôme> ARM-USB-OCD-H\ndetect\n" | ~/opt/urjtag/bin/jtag Connected to
    Jérôme> libftd2xx driver.  [nothing happens, locked in FT_Read] ^C

    Jérôme> If I run xc3sprog then UrJTAG again, UrJTAG is not happy, but in
    Jérôme> a different way:

    Jérôme>    $ echo -ne "cable ARM-USB-OCD-H\ndetect\n" |
    Jérôme> ~/opt/urjtag/bin/jtag Connected to libftd2xx driver.  error:
    Jérôme> when parsing command 'detect' $

    Jérôme> Now let's run OpenOCD, it initializes properly (same thing if
    Jérôme> run after xc3sprog):

    Jérôme>    $ ~/opt/openocd/bin/openocd -f config.cfg Open On-Chip
    Jérôme> Debugger 0.6.0-dev-00477-gf1c0133 (2012-03-26-20:56) Licensed
    Jérôme> under GNU GPL v2 For bug reports, read
    Jérôme> http://openocd.sourceforge.net/doc/doxygen/bugs.html Info : only
    Jérôme> one transport option; autoselect 'jtag' RCLK - adaptive RCLK -
    Jérôme> adaptive fast memory access is enabled dcc downloads are enabled
    Jérôme> force hard breakpoints use of EmbeddedICE dbgrq instead of
    Jérôme> breakpoint for target halt enabled trst_and_srst separate
    Jérôme> srst_gates_jtag trst_push_pull srst_open_drain Error: unable to
    Jérôme> get latency timer: OK Error: ftd2xx 1.04 detected - this has
    Jérôme> known issues with FT_GetLatencyTimer, upgrade to a newer version
    Jérôme> Info : device: 6 "2232H" Info : deviceID: 364511275 Info :
    Jérôme> SerialNumber: OLUSXGHBA Info : Description: Olimex OpenOCD JTAG
    Jérôme> ARM-USB-OCD-H A Info : max TCK change to: 30000 kHz Info : RCLK
    Jérôme> (adaptive clock speed) Info : JTAG tap: omapl138.jrc tap/device
    Jérôme> found: 0x1b7d102f (mfg: 0x017, part: 0xb7d1, ver: 0x1) Info :
    Jérôme> JTAG tap: omapl138.etb enabled Info : JTAG tap: omapl138.arm
    Jérôme> enabled Info : Embedded ICE version 6 Info : omapl138.arm:
    Jérôme> hardware has 2 breakpoint/watchpoint units Info : ETM v1.3 ^C #
    Jérôme> chain detected $

    Jérôme> Let's run it a second time, it does not work so well anymore:

    Jérôme>    $ ~/opt/openocd/bin/openocd -f config.cfg Open On-Chip
    Jérôme> Debugger 0.6.0-dev-00477-gf1c0133 (2012-03-26-20:56) Licensed
    Jérôme> under GNU GPL v2 For bug reports, read
    Jérôme> http://openocd.sourceforge.net/doc/doxygen/bugs.html Info : only
    Jérôme> one transport option; autoselect 'jtag' RCLK - adaptive RCLK -
    Jérôme> adaptive fast memory access is enabled dcc downloads are enabled
    Jérôme> force hard breakpoints use of EmbeddedICE dbgrq instead of
    Jérôme> breakpoint for target halt enabled trst_and_srst separate
    Jérôme> srst_gates_jtag trst_push_pull srst_open_drain Error: unable to
    Jérôme> get latency timer: OK Error: ftd2xx 1.04 detected - this has
    Jérôme> known issues with FT_GetLatencyTimer, upgrade to a newer version
    Jérôme> Info : device: 6 "2232H" Info : deviceID: 364511275 Info :
    Jérôme> SerialNumber: OLUSXGHBA Info : Description: Olimex OpenOCD JTAG
    Jérôme> ARM-USB-OCD-H A Info : max TCK change to: 30000 kHz Info : RCLK
    Jérôme> (adaptive clock speed) ^C # stuck in JTAG init $

    Jérôme> If I run xc3sprog then OpenOCD afterwards, OpenOCD will
    Jérôme> initialize properly.  So currently, I run xc3sprog to detect the
    Jérôme> JTAG chain prior any OpenOCD invocation.  I spent a few minutes
    Jérôme> in the code but nothing yet.

    Jérôme> Oh wait, if I run xc3sprog, then OpenOCD, then UrJTAG, then
    Jérôme> UrJTAG can work !  I say "can" because it seems to work with a
    Jérôme> higher probability when OpenOCD is shutdown quickly after it
    Jérôme> started.

    Jérôme> UrJTAG behaves in the same way when using libftdi, so I don't
    Jérôme> think it's ftd2xx's fault.

    Jérôme> At the moment I have no diagnostic, just stupid workarounds.

    Jérôme> I'd like to know if other people have encountered something like
    Jérôme> that before.  Perhaps someone has ideas on how to better
    Jérôme> diagnose this (I can live with my work-arounds, as they are
    Jérôme> included in scripts, but I'm not glad I have to resort to that).

    Jérôme> Best regards,

    Jérôme> -- cJ

    Jérôme> 
------------------------------------------------------------------------------
    Jérôme> Better than sec? Nothing is better than sec when it comes to
    Jérôme> monitoring Big Data applications. Try Boundary one-second
    Jérôme> resolution app monitoring today. Free.
    Jérôme> http://p.sf.net/sfu/Boundary-dev2dev
    Jérôme> _______________________________________________
    Jérôme> UrJTAG-development mailing list
    Jérôme> [email protected]
    Jérôme> https://lists.sourceforge.net/lists/listinfo/urjtag-development

-- 
Uwe Bonnes                [email protected]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to