irclog2html for #openjtag on 20060706

00:01.36*** join/#openjtag rwhitby (n=rwhitby@nslu2-linux/rwhitby)
00:34.31*** join/#openjtag ka6sox (n=ka6sox@nslu2-linux/ka6sox)
01:55.32*** join/#openjtag AchiestDragon (n=dave@whipy.demon.co.uk)
02:04.56*** join/#openjtag AchiestDragon (n=dave@whipy.demon.co.uk)
03:46.14rwhitbyvmaster: ping
04:18.15*** join/#openjtag ka6sox (n=ka6sox@nslu2-linux/ka6sox)
07:24.03vmasterrwhitby: pong
07:24.37rwhitbyvmaster: I have a few architectural questions about OpenOCD - is now a good time, or is 3 hours from now better for you?
07:25.22vmasterlater would be better
07:26.52rwhitbyvmaster: ok, I'll check back with you in a number of hours time after I have dinner and get the kids to bed.
07:27.57vmasteralright
07:28.08vmasterjust got up, and i'll be online all the day
07:28.57rwhitbyok, I expect I'll have some quality time in about 3 hours or so.
09:47.04*** join/#openjtag rwhitby (n=rwhitby@nslu2-linux/rwhitby)
10:23.19vmasterrwhitby: hey
10:23.50vmasteri've had a look at the EOnCE
10:24.02vmasterthe jtag part seems certainly doable
10:24.19vmasteris there GDB support for the freescale 56000 DSPs?
10:25.09rwhitbyYes, we believe that there is source code available, but we would obviously need to modify and upgrade that to get the maximum benefit out of OpenOCD.
10:25.32rwhitby(I'm not sure if the support has been contributed back to the GDB mainline)
10:26.23rwhitbyThe particular part we are looking at is the DSP56300 series.  It has a OnCE which seems to be a predecessor to the EOnCE in the later parts.
10:27.07rwhitbyAnd we want to be able to run multiple chips at the same time from a single JTAG chain, with two GDB sessions running through a single OpenOCD server instance.
10:27.16rwhitby(i.e. two targets)
10:28.44rwhitbyWe're not asking you to do the work - we're prepared to do that ourselves (we have software developers on staff).  We're looking to collaborate on making sure that we follow the OpenOCD modular architecture correctly, and perhaps even help test the flexibility of the architecture to support new (and very different) devices like the DSP56300.
10:29.45rwhitbyUnfortunately, I can't give you details of the target application (that's our confidential product information).
10:29.52*** join/#openjtag vmaster_ (i=vmaster@p549B50F2.dip.t-dialin.net)
10:30.05rwhitbyoops - how much did you miss?
10:31.17vmaster_uhm, everything
10:31.33vmaster_[12:22] < vmaster> rwhitby: hey
10:31.33vmaster_[12:23] < vmaster> i've had a look at the EOnCE
10:31.33vmaster_[12:23] < vmaster> the jtag part seems certainly doable
10:31.33vmaster_[12:23] < vmaster> is there GDB support for the freescale 56000 DSPs?
10:31.45rwhitbyYes, we believe that there is source code available, but we would obviously need to modify and upgrade that to get the maximum benefit out of OpenOCD.
10:31.51rwhitby(I'm not sure if the support has been contributed back to the GDB mainline)
10:31.59rwhitbyThe particular part we are looking at is the DSP56300 series.  It has a OnCE which seems to be a predecessor to the EOnCE in the later parts.
10:32.04rwhitbyAnd we want to be able to run multiple chips at the same time from a single JTAG chain, with two GDB sessions running through a single OpenOCD server instance.
10:32.10rwhitby(i.e. two targets)
10:32.16rwhitbyWe're not asking you to do the work - we're prepared to do that ourselves (we have software developers on staff).  We're looking to collaborate on making sure that we follow the OpenOCD modular architecture correctly, and perhaps even help test the flexibility of the architecture to support new (and very different) devices like the DSP56300.
10:32.21vmaster_that's supported by the OpenOCD
10:32.23rwhitbyUnfortunately, I can't give you details of the target application (that's our confidential product information).
10:32.33vmaster_sure, no problem
10:32.38rwhitbyok, that's the backlog re-pasted :-)
10:33.16vmaster_okay
10:33.28vmaster_well, you'd have to implement the interface defined in target.h
10:33.34rwhitbyThe details of the chip in question are in chapter 7 of http://www.freescale.com/files/dsp/doc/ref_manual/DSP56300FM.pdf
10:33.40vmaster_the gdb server simply uses these functions to control the targets
10:34.02rwhitbyyep, got that far in understanding today reading your thesis and the source code.
10:34.02vmaster_the API defined in jtag.h gives you access to the individual chips in the scan chain
10:34.15rwhitby(nice thesis, BTW)
10:34.31vmaster_thx
10:35.26vmaster_for the ARM parts I decided to split architectural stuff (armv4_5.[ch]), the common parts of arm7/9 (arm7_9_common.[ch]) and the parts specific to each core (arm7tdmi.[ch], ...)
10:35.31rwhitbyThe OnCE has some additional JTAG commands (ENABLE_ONCE, DEBUG_REQUEST, etc) - I presume they are handled by the target module and just pass through the jtag module.  Is that correct?
10:35.44vmaster_that's what I think
10:36.15rwhitbyyeah, if the EOnCE is backwards-compatible with the OnCE, we might do a similar thing.
10:36.48rwhitbyand there are a number of devices in the DSP563xx family which might need a similar grouping of architecture commonality.
10:37.15rwhitbyHad you thought of putting another layer of directory structure under the target module?
10:37.35rwhitby(i.e. arm, dsp563x, ppc, i386, etc)
10:37.41vmaster_yeah, exactly like that
10:37.53vmaster_shouldn't be much of a problem changing this now
10:38.19rwhitbythat would make it clearer which are generic target module files, and which are device specific.
10:38.44rwhitby(and would also make it easier to have different maintainers for different device families)
10:39.28rwhitbyAre you intending to continue work on OpenOCD after your exams are over?
10:39.34vmaster_sure
10:39.51vmaster_the next thing is completing the XScale stuff
10:40.00rwhitbyDo you have related employment which would enable you to do that full time?
10:40.22vmaster_I still have to write my master's thesis
10:40.47rwhitbyah - is that on the same or a related topic, or a completely different area?
10:40.49vmaster_I'm currently part-time employed by my university, allowing me to dedicate at least my spare-time to the OpenOCD
10:41.05vmaster_It's going to be about real-time tracing
10:41.08rwhitbyA very progessive university :-)
10:41.09vmaster_like the ARM ETM
10:41.52rwhitbyI think the OnCE or EOnCE has some trace support too.
10:42.27vmaster_I'll change the /target layout once I'm done with the MinGW stuff, giving you a stable version to base your work upon
10:43.07vmaster_i'll get something for lunch, be back in about 10 minutes
10:43.21rwhitbyok
10:55.35rwhitbyvmaster_: how long do you think it would take a developer experienced such as yourself to add a new target to OpenOCD?
10:57.08vmaster_i figured about a month for the xscale stuff, but that reused some of the existing arm code
10:57.20vmaster_but it really depends on the debug features provided by the core
10:57.46vmaster_on the arm7/9 you have to manually operate the pipeline
10:58.03vmaster_the xscale is easier, it just runs a debug handler with which you communicate serially
10:58.32rwhitbyI'd be interested in your first impressions of the OnCE and how hard that would be ...
11:15.34vmaster_okay, it looks a bit more complicated than the arm7/9, but it's well documented
11:18.38vmasterthe DEBUG_REQUEST instruction allows you to force the core into debug, the ENABLE_ONCE allows you to talk to the OnCE via the Shift-DR JTAG state
11:19.02vmasterafter entering debug, you save the pipeline state to the debugger, so you can resume the core later
11:19.53vmasteryou can then access the OnCE registers (status registers, breakpoints, pipeline state), or put a DSP instruction into the OnCE, which can then be executed, and the results examined
11:20.37vmasterwhen you're done with the debug session you restore the pipeline state, and let the core run
11:22.41rwhitbyyeah, OPDBR, OPILR and OGDBR.
11:24.10rwhitbyDo you have plans for supporting things like the Trace Buffer (section 7.2.5 of the DSP56300 manual)?
11:25.07vmasterthat's the idea, currently, but I'm not sure what this is going to look like - i don't think gdb supports the idea of a back-trace
11:25.55rwhitbyDo you think the 24-bit nature of this device will present any problems?
11:25.58vmasterXScale has something similar, you can always access the trace-buffer, and see the code-flow from before
11:26.02vmasternope
11:26.09vmastermore than 32-bit would mean more work, but less is simple
11:26.26vmasterall data is stored in u8 arrays
11:26.32vmasterlittle-endian
11:26.35vmasteras that's what JTAG uses
11:30.09rwhitbyWhat type of maximum download speeds are you seeing through JTAG?  Which dongle is the fastest?
11:31.53vmasteron the ARM7/9 I can download ~150kb/s using the Amontec JTAGAccelerator, and 120kb/s using the FTDI FT2232
11:32.25vmasterbut it's probably a lot less with the OnCE architecture
11:32.58rwhitbywhat's the limiting factor of OnCE?
11:34.05vmaster7.2.7.6 is for reading, but writing is going to be similar
11:34.13vmasteryou often have to wait for a previous operation to complete
11:34.35vmasteron the arm, i have to wait once every 14 words - on the OnCE, you'll have to wait several time for every word
11:34.54vmasterwaiting means polling a status bit
11:35.13vmasterand USB latency is going to kill performance
11:35.14rwhitbysteps 3, 10 and 13?
11:35.26vmasteryeah
11:35.42vmasteryou could pretend that the core is always going to be faster than your jtag interface
11:35.58vmasteri do this in a 'turbo' mode for the arm7/9
11:36.05rwhitbywould a custom wiggler that could sense the DE pin help?
11:36.07vmasterbut it's risky, and might fail every now and then
11:36.19rwhitbyhmm - I guess you've still got the USB latency then
11:37.31vmasteri'll check something in the ft2232 datasheet... hold on
11:38.47vmasterthere's a command to wait on a line to go high/low
11:38.56vmasterthat would allow you to greatly improve performance
11:39.22vmasterbut of course it would break OpenOCD's generic JTAG API
11:40.10rwhitbyDo other chips have non-standard outputs that could be supported in a generic way back to the target module?
11:41.16vmasterthe ARM jtag header defines an external DBGACK signal, but i haven't seen a single core nor a single emulator that actually connected it
11:41.46rwhitbyan opportunity for OpenOCD to get break-through performance? ;-)
11:42.48vmasteri've stopped working on these things as the necessary work didn't justify possible gains
11:43.06vmasterhttp://openocd.berlios.de/web/?page_id=22
11:43.15vmasterthis describes some first thoughts i had on an improved api
11:43.34vmasterit would communicate with a uC/fpga that is able to do the busy waiting
11:47.00rwhitbyAssuming the core is faster than the jtag interface, do you think we could get close to the performance you are seeing on ARM with the OnCE architecture, or is it 50% or 25% or 10% ?
11:47.26rwhitby(i.e. if we implement the risky "turbo" mode)
11:53.37vmasterok, the turbo mode on the arm isn't 120kb/s, but rather ~40kb/s (but it doesn't require any on-chip memory, while the 120kb/s require a small area of on-chip memory), and the once isn't going to reach this
11:55.52rwhitbyI presume that there is nothing in OpenOCD which is a bottleneck - i.e. the bottlenecks are all elsewhere in the OnCE architecture or the USB latency for small packets?
11:57.58vmasterthe 40kb/s are because of USB latency and the FT2232C, which doesn't achieve the theoretical 6mhz with the small scan sizes associated with debugging
11:58.20vmasteri'm just doing some calcuations to give you a better answer for a OnCE number
12:17.25vmasterokay, on the arm, it takes about 2.4 tck cycles per bit of data, with the OnCE it's going to be more than 5.5
12:21.10vmasterwriting a register of the OnCE takes 89 tck cycles, and storing that register takes 42 tck cycles
12:25.59rwhitbyMacgraigor says that their USB2Demon gets 89000bytes/sec to ARM7 and 104000bytes/sec to ARM9.  How do they achieve those types of numbers (or are they exaggerating)?
12:26.43rwhitbydid you mean storing or reading a register takes 42 tck cycles?
12:27.16vmasterstoring the register to target memory
12:28.43vmasteri believe macraigor is exaggerating - using a Wiggler and a Raven, I've never achieved more than 2/3 of what they claimed
12:28.50vmastermaybe on a really high-end system
12:31.37vmasterjust did some test runs, on an lpc2294 i achieve ~50kb/s
12:32.02vmasterbut i don't know what hardware the usb2demon uses
12:32.36vmasteror if the 89kb/s are quoted for DCC downloads, where the openocd achieves 120kb/s
12:32.47rwhitbySo you've calculated that the OnCE is going to be about 40% of the ARM performance?  (2.4 vs 5.5 => 17kb/s for OnCE)?
12:32.56vmastersomething like that, yeah
12:33.27vmasteron the arm, i can tell the core to load 14 registers at once, and then supply just the data for each register
12:33.38vmasteron the once, you have to tell the core to load each register invidiually
12:33.40rwhitbyI expect Mcgraigor would quote for the fastest download mode (DCC)
12:34.31rwhitbyHmm - multiple registers would really help for the gdb server support.
12:35.02vmasterhmm?
12:35.47rwhitbybeing able to tell the core to load 14 registers instead of one at a time would be good for the gdb server support.
12:36.20vmasterwell, it only matters for bulk transfers, for course
12:36.26vmasterwhere you load larger amounts of memory
12:36.52rwhitbyoh, I thought you were referring to saving and restoring state
12:36.55vmasterexamining/modifying registers is still going to be faster than you'll notice, probably only limiting single-step performance
12:38.11rwhitbyare you aware of any other products with an API to jtag and OCD functionality, or is OpenOCD really the first of it's kind?
12:38.55vmasterthere are several jtag debuggers for ARMs
12:38.58vmasterjtagger
12:39.00vmasterjelie for xscale
12:39.15vmasterthey're all unmaintained since more than 2 years
12:40.25vmasteroh, it's jtager, not jtagger
12:40.29rwhitbyall are arm-specific though, with no thought to modularity for other device families ?
12:40.46vmasteryes
12:41.05vmasterthey also support only one device per scan chain
12:41.05rwhitbyyeah, that's what drew us to OpenOCD in the first place.  The software architecture looked clean.
12:41.32rwhitby(clean from the point of view of adding a non-ARM device)
12:41.37vmasterand their jtag api doesn't allow commands to be queued - if you send every jtag scan directly through usb, you'll end up at 1% of openocds performance)
12:42.12vmasteri tried to keep it clean, but of course you only know what you're missing when you need it
12:42.26rwhitbywhat's the performance difference between a good parallel port wiggler and a good USB wiggler?
12:42.30*** join/#openjtag prpplague (n=billybob@72.22.131.223)
12:42.54vmasterto me, "Wiggler" refers to bit-banging devices
12:43.13vmasterwhich is only possible over the parallel port
12:43.20rwhitbys/wiggler/dongle/
12:43.33rwhitbyheh
12:43.38rwhitbys/wiggler/dongle/g
12:43.39prpplaguevmaster: why can't you bit bang using usb?
12:43.55prpplaguevmaster: as i've done with the ez-usb stuff
12:43.57vmasterit's going to be horribly slow
12:44.15prpplaguevmaster: its as fast as a standard parport wiggler
12:44.26vmasteras i said, horribly slow ;)
12:44.44vmasterwell, i never tried the ez-usb, only the ft2232, and using it for bitbanging was a nightmare
12:45.11prpplaguevmaster: yea
12:45.23prpplaguevmaster: it leaves something to be desired
12:45.39prpplaguevmaster: i also use the ft2232 for other bit banging, such as programming nand flash
12:45.45rwhitbyso a USB dongle outdoes a parport wiggler every time for jtag work?
12:46.03rwhitbyor does it depend on the software driving it?
12:46.27prpplaguerwhitby: depends on both the hardware and software
12:47.13rwhitbyvmaster: for best performance with OpenOCD, which dongle should we buy/make?
12:48.06vmasterthe JTAGAccelerator (IEEE1284 EPP mode) is less latency sensitive, but rather expensive and proprietary
12:48.29vmasterthe FT2232C is a good compromise
12:48.51vmasterand performance is comparable if you don't have to poll your target too often
12:49.10vmasteryou can get a DLP2232M evaluation module, add a 3V3 regulator, and have a working dongle
12:49.16rwhitbyIs that the Amontec JTAG Accelerator and the JTAGkey respectively?
12:49.21vmasteryes
12:49.50vmasterJTAGAccelerator is a configuration for amontec's Chameleon (Xilinx CPLD + IEEE1284 transceiver)
12:50.06vmasterJTAGkey is just a FT2232 + buffers for low-voltage targets
12:50.17rwhitbyFor OnCE, I guess we will be polling a bit, so the accel might be a better choice?
12:50.29vmasteri think so, yes
12:50.30rwhitby(irrespective of cost)
12:51.06rwhitbyAnd I guess with the POD we could do the DE output signal sensing too ?
12:52.25vmasterwith the Chameleon? IIRC the protocol had some status bits left, which Amontec could use to display the state of this extra line
12:52.34vmasterbut they would have to change the configuration
12:53.28rwhitbyWe have a guy who could probably work out how to reprogram it ...
12:53.56vmastermhh, reprogramming the Chameleon is easy - use the OpenOCD ;)
12:54.15vmasterbut Amontec doesn't provide the VHDL of the JTAGAccelerator configuration
12:54.34rwhitbyAnd for our customers who don't need the extra speed, they can just make a standard parport wiggler for the lowest cost...
12:54.39vmasteryep
12:55.21rwhitbyHG?
12:55.22vmasterprpplague: OnCE adds some extra overhead
12:55.33vmasterhome-grown?
12:55.47prpplagueHolly-Gates
12:55.50vmasterah, hehehe ;)
12:56.35vmasteryou'll need the additional nSRST line if you want to debug out of reset
12:56.48vmaster(on the OnCE)
12:57.29rwhitbyLooks like Amontec will sell you the VHDL code for the accelerator ...
12:57.47prpplagueeveryone is welcome to register and add additional information
12:59.06rwhitbyno mention of OpenOCD on that page yet?
12:59.51prpplaguerwhitby: naw, i keep forgetting to add it
13:07.45rwhitbyvmaster: thanks for your help - time for sleep here now.  talk to you another day.
13:08.34vmasteryou're welcome - good night
13:33.48prpplaguehmm, does openocd support debugging on arm in thumb mode?
13:34.22prpplaguevmaster: jtager doesn't
13:34.28vmasterOpenOCD does
13:34.33prpplaguevmaster: ahh cool
13:35.04vmasterbut GDB support for Thumb debugging on armv4t isn't optimal
13:35.13prpplaguevmaster: isn't 0x787 the standard ARM manufacturer id when in debug?
13:35.32prpplaguevmaster: yea, i just need to reverse enginer a few things
13:37.30vmastermhh, no idea what ID you mean
13:37.46vmasterthe disassembler I've wrote for the OpenOCD doesn't support thumb yet
13:38.01vmasterbut you can disassemble with the GDB at address+1
13:38.02prpplaguevmaster: ahh, i just want registers
13:38.42prpplaguevmaster: when in ice you can call for a device id, for arm7 it should respond as 0x0f0f0f0f
13:39.00vmasterah, you mean the IDCODE?
13:39.13prpplagueyea
13:39.15vmasterLPC for example replies as 0x3f0f0f0f
13:39.40prpplagueright
13:39.49vmasterbut i don't think this is mandatory, or is it?
13:40.28prpplaguei can't find any info on it
13:40.37vmasterhttp://www.arm.com/support/faqip/3843.html
13:40.38prpplaguebut i have found just bits and pieces
13:44.22prpplagueahh thanks
13:44.26prpplaguedon't know how i missed that
13:46.30prpplagueahh yea, looks like both jtag tools and jtager both have the information incorrect
13:46.50prpplaguethey have the 0x787 manufacturer id attributed to samsung
17:00.35prpplaguevmaster: hmm "command core_state not found" in oocd
17:01.29vmasterarmv4_5
17:01.38vmasterthis is an armv4_5 specific command
17:01.50vmasterso you should enter it as "armv4_5 core_state"
17:02.25vmasteri'll have to change the layout of the help output a bit to make it clear which commands belong to each other
17:02.37vmastersame goes for "flash info" "flash write" etc.
17:02.58vmasteri'll get my dinner, be back in a bit...
17:03.57prpplagueahh
17:04.45prpplaguevmaster: what about the syntax of jtag_reset ?
17:05.19prpplaguevmaster: btw , you might want to add one more entry in the parport dongles, as the holly-gates is a popular design and its identical config to the triton
17:24.26prpplaguevmaster: how robust is the scripting?
17:24.51prpplaguevmaster: does it just feed the commands to the commandline parser?
17:28.11vmasterprpplague: actually, you're the first and only one i've ever heard mentioning "holly-gates", but adding this to the cable definitions isn't a problem, just show me the line you're using
17:28.54prpplaguevmaster: its the one marked triton
17:30.36vmasterprpplague: does it have a nSRST line?
17:31.36vmastertriton is a pxa250 board by karo electronics, with a built-in "wiggler", but it lacks the SRST, so it's no use for debugging
17:36.23prpplagueno the default design of the HG does not have SRST
17:36.43prpplaguei've added one to my board
17:37.22prpplaguevmaster: you can check out the schematic at http://www.lartmaker.nl/projects/jtag/
17:37.46vmasterah, i have that one ;)
17:43.55vmasteri've added a note to the docs that 'triton' is the same layout as is used by the holly gates design
17:44.54prpplaguethanks
17:44.58prpplaguejust a helpful item
17:58.27vmasteryeah, thanks, i completely forgot about the dongle that came with my lart
20:55.51*** join/#openjtag ka6sox (n=ka6sox@nslu2-linux/ka6sox)
23:39.26wookeyvmaster: you have a lart? Quite a rare beast these days :-)
23:39.37wookeyWe still have a pile of those JTAG devices
23:41.18wookey(and curently use them for programming balloons, although they are about to be superceded by a wiggler-compatible
23:41.22wookey)
23:51.45*** join/#openjtag rwhitby (n=rwhitby@nslu2-linux/rwhitby)

Generated by irclog2html.pl by Jeff Waugh - find it at freshmeat.net! Modified by Tim Riker to work with blootbot logs, split per channel, etc.