**** BEGIN LOGGING AT Tue Mar 07 10:59:57 2006 Mar 07 12:56:02 ~seen beewoolie-afk Mar 07 12:56:04 beewoolie-afk was last seen on IRC in channel #openjtag, 7d 9h 38m 41s ago, saying: 'If you want to add a target, make sure to get a BSDL file.'. Mar 07 12:56:12 ~seen beewoolie Mar 07 12:56:14 beewoolie was last seen on IRC in channel #openjtag, 24d 13h 4m 48s ago, saying: 'I thought they were going SA-SCSI so there'd only be a dozen or so pins.'. Mar 07 16:50:26 <[g2-lap]> vmaster where's the best link for the svn of openOCD berlios.de ? Mar 07 16:52:47 http://svn.berlios.de/svnroot/repos/openocd/ Mar 07 16:57:44 <[g2-lap]> vmaster can I just do a co from there ? Mar 07 16:58:36 <[g2-lap]> looks like it Mar 07 17:00:06 yeah Mar 07 17:00:47 i've quite a lot of fixes in my local tree, but they all depend on each other, and i'm always just fixing "that one last bit" Mar 07 17:04:07 <[g2-lap]> developing a community isn't always easy Mar 07 17:04:34 <[g2-lap]> I'm glad the openjtag community is coming along, but it's a long time in the making Mar 07 17:04:52 <[g2-lap]> some things like the nslu2 or ep93xx are just a lot easier to get interest Mar 07 17:07:09 <[g2-lap]> vmaster is configure missing from R47 or is it me ? Mar 07 17:08:00 <[g2-lap]> bbi 10 Mar 07 17:10:18 ./boostrap Mar 07 17:10:27 s/boostrap/bootstrap Mar 07 17:11:57 if you don't want to build with support for the ft2232 devices you should use --disable-ftdi2232 and --disable-ftd2xx (i've already changed these to default off in my local tree) Mar 07 17:41:01 <[g2-lap]> ok thx Mar 07 17:59:18 <[g2-lap]> vmaster ping Mar 07 18:00:10 [g2-lap]: pong Mar 07 18:00:55 <[g2-lap]> Ok so I build with the disables Mar 07 18:01:00 <[g2-lap]> s/build/built/ Mar 07 18:01:01 [g2-lap] meant: Ok so I built with the disables Mar 07 18:01:24 <[g2-lap]> ./src/openocd Mar 07 18:01:24 <[g2-lap]> Error: configuration.c:127 parse_config_file(): couldn't open config file Mar 07 18:01:41 there are some example configs in the ./doc/configs/ folder Mar 07 18:01:54 <[g2-lap]> where do they go ? Mar 07 18:02:04 either rename one to openocd.cfg (default), or specify the name with '-f config.file' Mar 07 18:02:16 all cwd at the moment Mar 07 18:02:34 or an absolute path, of course Mar 07 18:02:52 <[g2-lap]> does the device really need to be there ? Mar 07 18:03:35 yes Mar 07 18:03:51 <[g2-lap]> that might be an issue :) as I've have now Mar 07 18:03:57 <[g2-lap]> s/now/none/ Mar 07 18:03:58 [g2-lap] meant: that might be an issue :) as I've have none Mar 07 18:04:30 <[g2-lap]> vmaster I would humbly suggest having a default memory device/test adapter Mar 07 18:04:41 hm? Mar 07 18:05:05 <[g2-lap]> then ppl could verify the program operation and connectivity of the tool chain and the jtag device separately Mar 07 18:05:18 <[g2-lap]> and also play around with the tool Mar 07 18:05:31 <[g2-lap]> does that make sense ? Mar 07 18:05:57 mhh, not to me, but that might be because i'm biased - i've designed it that way because i thought people would use it that way Mar 07 18:06:27 <[g2-lap]> sure I think that makes sense Mar 07 18:06:54 it's a daemon process that continously talks to the target Mar 07 18:07:06 <[g2-lap]> however I'm talking about bringing new users into the ocd fold, or allowing ppl to evaluate the sw Mar 07 18:07:33 <[g2-lap]> right and the daemon can talk to a "fake" device in memory" Mar 07 18:07:51 ah, ok Mar 07 18:07:54 <[g2-lap]> a pretend ARM7, ARM9, your device Mar 07 18:08:22 <[g2-lap]> then the boot it all up, check out the scan chain, detect, etc... Mar 07 18:08:32 <[g2-lap]> maybe even step and breakpoint Mar 07 18:08:59 <[g2-lap]> it _might_ even make sense to interface to QEMU running in emulation Mar 07 18:09:17 * [g2-lap] guesses the emulation part of the is redundant Mar 07 18:09:40 <[g2-lap]> then you could O Mar 07 18:09:44 <[g2-lap]> oops.. Mar 07 18:10:13 <[g2-lap]> then you could OCD debug QEMU system apps Mar 07 18:10:31 * [g2-lap] thinks that'd be neat Mar 07 18:10:39 yeah, that would indeed be very nice Mar 07 18:10:42 <[g2-lap]> but it's really a side show Mar 07 18:10:47 yep Mar 07 18:11:04 <[g2-lap]> the point being many new users will want to play and learn the sw Mar 07 18:11:08 <[g2-lap]> and experiment with it Mar 07 18:11:27 <[g2-lap]> and IMHO they shouldn't need a jtag device and hw to do that Mar 07 18:11:45 <[g2-lap]> clearly if the like it they'll be heading that way Mar 07 18:12:11 <[g2-lap]> but 80% (or at least 50%) will be non target specific Mar 07 18:12:26 <[g2-lap]> and you can have testers debug and fix those without devices Mar 07 18:12:39 <[g2-lap]> does that make much sense ? Mar 07 18:12:46 <[g2-lap]> do you agree ? Mar 07 18:12:57 <[g2-lap]> or is [g2-lap] full of it ? Mar 07 18:13:40 well, yeah, it would be nice, but it sounds like a lot of work for a "sideshow" Mar 07 18:14:20 and most problems are very hardware related Mar 07 18:14:32 so testers wouldn't gain much from testing an emulated target Mar 07 18:14:48 unless the emulator simulates all the nasty details of all the different uCs (not only cores) Mar 07 18:15:10 <[g2-lap]> it's not to simulate all that stuff Mar 07 18:15:21 <[g2-lap]> it's to enable debugging the tool Mar 07 18:15:43 <[g2-lap]> i.e. here I sit all ready to go Mar 07 18:15:57 yeah, but to debug the tools you'd have to simulate a lot of details of the target system Mar 07 18:15:57 <[g2-lap]> I can't hookup gdb to ocd Mar 07 18:16:31 <[g2-lap]> ok it was just a sugggestiong Mar 07 18:16:55 <[g2-lap]> however, I'm left in the situation of the following regarding OCD now Mar 07 18:17:08 <[g2-lap]> 1) get an adapter and wait for it to arrive Mar 07 18:17:23 <[g2-lap]> or 2) work on something else Mar 07 18:18:15 <[g2-lap]> ok 3) I'll look at the OCD implementation and figure out how to do and ep93xx adapter Mar 07 18:18:27 <[g2-lap]> but that's not the normal case Mar 07 18:18:39 do you have any parallel port download cable? Mar 07 18:18:44 xilinx, lattice, whatever Mar 07 18:19:03 <[g2-lap]> I have a couple of those, but no parallel on the ARM boards where I'm running this Mar 07 18:19:33 <[g2-lap]> the ep93xx is ready to run JTAG at 8Mhz via bit-banging Mar 07 18:19:53 <[g2-lap]> OCD is compiled for it Mar 07 18:20:08 oh, so you compiled openocd to run on the ep93xx? Mar 07 18:20:16 <[g2-lap]> :) Mar 07 18:20:41 <[g2-lap]> I compiled it in an ARM chroot Mar 07 18:20:46 ok Mar 07 18:20:56 <[g2-lap]> it was actually compiled on the Loft as that's a lot faster Mar 07 18:21:14 <[g2-lap]> but I built 99% of beewoolies JTAG adapter on the ep93xx Mar 07 18:21:23 <[g2-lap]> ok 70% Mar 07 18:21:33 <[g2-lap]> then I switch to the faster box Mar 07 18:22:03 <[g2-lap]> so I could reboot into the ep93xx on that external drive with ocd compiled and ready to urn Mar 07 18:22:13 <[g2-lap]> burn/run Mar 07 18:22:33 <[g2-lap]> we are but a driver away Mar 07 18:23:07 <[g2-lap]> then depending on size we'd add it to OE and have a flash built ssh+ocd rootfs Mar 07 18:23:53 ok, at least i understand why you'd want a simulated target to start with Mar 07 18:26:21 but most people aren't looking to port openocd to their own jtag platform, but rather want to debug the target they already have Mar 07 18:27:01 <[g2-lap]> sure Mar 07 18:27:24 <[g2-lap]> but lets talk about where we go from here Mar 07 18:27:34 <[g2-lap]> with the ep93xx platform Mar 07 18:28:19 <[g2-lap]> I'd imagine that all of this would port the the geep (except for may the Port assignments) which are most likely trivial Mar 07 18:28:34 <[g2-lap]> AchiestDragon thoughts on the last comment ? Mar 07 18:29:16 <[g2-lap]> I've got OCD compiled for the 93xx but no driver GPIO driver yet Mar 07 18:29:23 <[g2-lap]> the FPGA only makes it better Mar 07 18:29:32 <[g2-lap]> which would be new work Mar 07 18:29:49 porting it to something using gpio would only require something similar to src/jtag/parport.c Mar 07 18:30:31 <[g2-lap]> vmaster well we can run really fast as lennert found out yesterday Mar 07 18:30:45 yeah, saw that Mar 07 18:31:04 <[g2-lap]> so now we are in the area of general design versus performance Mar 07 18:31:17 <[g2-lap]> it's a little like usability and security Mar 07 18:31:25 hmm Mar 07 18:36:17 the ep9302 has gpio the geep without the jtag board could use its onboard fpga to bit bang as fast as with it but the buffer would be limited to using the 64mb video ram Mar 07 18:38:00 <[g2-lap]> AchiestDragon from what I know about the geep it'll do a lot of things Mar 07 18:38:35 <[g2-lap]> regarding JTAG to 5-8Mhz rates we may be able to get there directly with a 9302 and DIOs Mar 07 18:38:51 yes Mar 07 18:39:03 <[g2-lap]> so that's basicall $65 from Glomation in 100 piece quantity Mar 07 18:41:11 ah, i looked at the ep's SSP today. it would be flexible enough to do JTAG, but it's maximum frequency is ~3.5mhz, so that's no use, if it can bitbang faster than that Mar 07 18:42:28 <[g2-lap]> I think lennert was bangning at nearly 15+Mhz yesterday for nearly an effective 8Mhz TCLK rate Mar 07 18:43:45 <[g2-lap]> we don't have to run that fast to start, but we could run at 800K and handle all the normal stuff like chip detect, scan etc Mar 07 18:43:49 <[g2-lap]> then just crank the rate Mar 07 18:44:10 <[g2-lap]> it should be about as easy as it gets Mar 07 18:50:56 <[g2-lap]> lennert ping Mar 07 18:52:57 <[g2-lap]> lennert vmaster I suggest for now lennert and I just put a big #ifdef around the whole parport.c code and insert the ep93xx GPIO output routines for outb Mar 07 18:53:10 <[g2-lap]> and set jtag_speed=0 Mar 07 18:54:07 <[g2-lap]> sound sane or silly ? Mar 07 18:55:17 <[g2-lap]> vmaster and we'd need and arm9_par ? Mar 07 18:55:23 <[g2-lap]> or arm9_wiggler ? Mar 07 18:55:49 arm9_wiggler Mar 07 18:56:07 <[g2-lap]> then one glomation ts72xx could openocd another Mar 07 18:56:09 is a config example for arm9tdmi targets using a paralell port wiggler Mar 07 18:56:11 yep Mar 07 18:56:30 <[g2-lap]> I think I've got 4 boards Mar 07 18:56:48 <[g2-lap]> two 7200s, a glomation, and a cirrus Mar 07 18:57:20 <[g2-lap]> vmaster are there any really cheap arm7s out there ? Mar 07 18:58:18 <[g2-lap]> and it'll take vmaster about 5 seconds to the the arm9_wiggler conf right ? Mar 07 18:58:55 the philips lpc boards from olimex are quite cheap Mar 07 18:59:39 about $50 for the smallest one Mar 07 18:59:42 <[g2-lap]> sparkfun sells those right ? Mar 07 19:00:12 yeah Mar 07 19:03:29 that one should be enough: http://www.sparkfun.com/commerce/product_info.php?products_id=667 Mar 07 19:03:32 $30 Mar 07 19:05:22 not sure if you can actually buy one though... lpc2103 is hard to get Mar 07 19:05:53 <[g2-lap]> well I probably don't _need_ it Mar 07 19:06:07 <[g2-lap]> the arm9's will most likely work Mar 07 19:06:13 <[g2-lap]> but it would be fun Mar 07 19:06:36 <[g2-lap]> not nearly as much fun as making ocd/taproot run on ep93xx though :) Mar 07 19:07:38 if you just want to have a look at the openocd's command line interface telnet to mmd.ath.cx:4444 Mar 07 19:08:02 a philips lpc2294 connected with a ftdi ft2232 jtag interface, running a blinking led example Mar 07 19:10:23 <[g2-lap]> vmaster I'd like to get it running on the ep93xx then I'll play with it :) Mar 07 19:10:43 heh, ok Mar 07 19:10:45 <[g2-lap]> lennert saw your talk at fosdem and said it sounded interesting Mar 07 19:10:54 <[g2-lap]> that's plenty good enough for me Mar 07 19:11:11 <[g2-lap]> so there are 9 lines you use in the parallel port Mar 07 19:11:27 no Mar 07 19:11:35 6 lines Mar 07 19:11:46 TDI, TDO, TMS, TCK, nTRST and nSRST Mar 07 19:11:56 <[g2-lap]> /* name tdo trst tms tck tdi srst o_inv i_inv init */ Mar 07 19:12:09 <[g2-lap]> tdo trst tms tck tdi srst o_inv i_inv init */ Mar 07 19:12:14 the other three elements of the cable structure define the polarity (output invert, input invert) and the initial value the port should be set to (init) Mar 07 19:12:35 <[g2-lap]> Ok so we are good to go with 1 byte Mar 07 19:12:43 yeah Mar 07 19:13:03 parport.c provides an amount of flexibility you don't need with the ep93xx, where you define what the lines are Mar 07 19:13:52 <[g2-lap]> right. I was gonna ifdef the original code out and just rewrite the rest for the ep93xx trying to keep the functions the same Mar 07 19:14:30 i'll give you a blank ep93xx.c where you just have to fill in three functions Mar 07 19:14:55 read (tdo) write (tdi, tms, tck) and reset (trst, srst) Mar 07 19:15:32 well, and the init stuff (if that's necessary for how you access the gpio's on the ep93xx) Mar 07 19:15:57 <[g2-lap]> well I think I'd inline assember those functions in that routine Mar 07 19:16:25 <[g2-lap]> maybe not Mar 07 19:16:33 <[g2-lap]> it'll just be one statement Mar 07 19:18:18 <[g2-lap]> vmaster lemme see if i've got this right Mar 07 19:18:40 <[g2-lap]> the ep93xx.c would be used instead of the parport.c right ? Mar 07 19:19:17 <[g2-lap]> then we'd have a arm9_ep93xx.cnf Mar 07 19:19:52 yes Mar 07 19:19:59 all the logic is in bitbang.c Mar 07 19:20:15 which just calls read, write and reset to toggle the lines Mar 07 19:21:32 * [g2-lap] was just glancing at that Mar 07 19:25:29 http://mmd.ath.cx/ep93xx.c Mar 07 19:26:32 this has to be included in jtag.c where all the other interfaces are IFDEFed, and then added to the autotools stuff Mar 07 19:34:51 <[g2-lap]> vmaster THX Mar 07 19:38:09 <[g2-lap]> ok so #if BUILD_EP93XX == 1 define the extern and Mar 07 19:39:04 <[g2-lap]> #if BUILD_EP93XX == 1 include the routine Mar 07 19:39:14 <[g2-lap]> those two places Mar 07 19:39:23 <[g2-lap]> plus the autotools stuff Mar 07 19:40:46 yeah Mar 07 19:41:12 "include the routine" would be &ep93xx_interface Mar 07 19:43:25 <[g2-lap]> nod :) Mar 07 19:43:43 sorry, back Mar 07 19:45:57 doing the ep93xx gpio bits is really easy, i can do that Mar 07 19:47:51 <[g2-lap]> cool Mar 07 19:50:15 [g2-lap]: how do you want to hook up the GPIOs? Mar 07 19:50:37 all on port A? Mar 07 19:50:54 <[g2-lap]> lennert can you look at port C ? Mar 07 19:50:59 sure Mar 07 19:51:02 <[g2-lap]> I'm not sure where port A comes out Mar 07 19:51:13 <[g2-lap]> ports C and D come out on the keyboard header Mar 07 19:51:14 ok, and what bit assignment? Mar 07 19:51:27 do you have a multimeter? Mar 07 19:51:33 <[g2-lap]> for now I don't think it matters Mar 07 19:51:38 ok, i'll pick something Mar 07 19:51:38 <[g2-lap]> yeah a cheap one Mar 07 19:51:47 <[g2-lap]> I've got flying leads Mar 07 19:52:05 <[g2-lap]> so I can just arrange them Mar 07 19:52:07 0:TDO 1:TDI 2:TCK 3:TMS 4:TRST 5:SRST Mar 07 19:52:22 <[g2-lap]> actually we should look at the header Mar 07 19:52:34 ok, can you do that bit? Mar 07 19:52:36 <[g2-lap]> I've got the 6 pin connectors from digilent Mar 07 19:52:39 then i'll write the code now Mar 07 19:52:45 already half done in fact Mar 07 19:52:46 <[g2-lap]> sure Mar 07 19:53:39 vmaster: what do i return on error? ERROR_ERROR? :) Mar 07 19:54:23 heh :P Mar 07 19:54:38 ERROR_OK Mar 07 19:54:47 but that's not checked in most cases anyway ;) Mar 07 19:54:48 ERROR_OK = everything is fine Mar 07 19:54:51 what if the init failed? Mar 07 19:55:02 or no? Mar 07 19:55:03 ERROR_JTAG_INIT_FAILED Mar 07 19:55:06 thanks Mar 07 19:56:03 vmaster: should i drive TDI/TCK/TMS/TRST/SRST to any particular value in init()? Mar 07 19:56:30 TDI and TCK low, TMS, TRST and SRST high Mar 07 19:56:35 thanks Mar 07 19:56:57 it's not strictly necessary, but that's how i initialize the parport interfaces Mar 07 19:57:12 well, driving the resets high is necessary Mar 07 19:57:23 you should initialize the output_value with that Mar 07 19:57:40 if you're using it at all Mar 07 19:57:45 yeah Mar 07 19:57:48 <[g2-lap]> lennert we can change the pin assignment later Mar 07 19:57:52 there's no atomic 'make high' or 'make low' register Mar 07 19:58:14 ah, ok Mar 07 19:58:19 <[g2-lap]> I'll have to buzz some cables Mar 07 19:58:24 so i have to write all the bits every time Mar 07 19:58:58 <[g2-lap]> lennert we can read modify write Mar 07 19:59:11 [g2-lap]: no need, we keep a local u8 with the mask we last wrote Mar 07 19:59:22 rmw is too slow Mar 07 19:59:27 yeah, that's how it's done for the parport, too Mar 07 20:00:15 <[g2-lap]> lennert not if you inline assembler Mar 07 20:01:01 * [g2-lap] guesses our budget is around 13-15 instructions Mar 07 20:02:04 http://www.wantstofly.org/~buytenh/ep93xx/ep93xx-openocd-jtag.diff Mar 07 20:02:09 it probably won't even compile, but you get the idea Mar 07 20:02:12 <[g2-lap]> but we can look at the optimzation stuff in detail later Mar 07 20:02:14 this assumes gpio port A Mar 07 20:02:21 for gpio port C/D i have to change two offsets Mar 07 20:02:35 it just mmaps /dev/mem like my test code Mar 07 20:02:36 <[g2-lap]> lennert lets start with C Mar 07 20:02:40 C is fine too Mar 07 20:02:42 <[g2-lap]> "ROW..." Mar 07 20:02:58 <[g2-lap]> unless you are gonna test on the TS7200 Mar 07 20:03:17 <[g2-lap]> actually it should be A or B for the TS and C for the glomation for now Mar 07 20:03:27 i'll make it configurable Mar 07 20:03:41 <[g2-lap]> unless port A is brought out on the glomation somewhere Mar 07 20:03:51 <[g2-lap]> I found C/D but not A yet Mar 07 20:04:34 <[g2-lap]> and we've got to be configured properly for GPIO not keboard in the syscfg reg or whatever it's called Mar 07 20:04:38 <[g2-lap]> I'm sure lennert knows Mar 07 20:06:21 http://www.wantstofly.org/~buytenh/ep93xx/ep93xx-openocd-jtag.diff Mar 07 20:06:22 new version up Mar 07 20:06:27 with configurable gpio port a/b/c/d Mar 07 20:06:34 didn't do the sysconf bits yet Mar 07 20:07:50 how does it look? Mar 07 20:09:02 [g2-lap]: i don't think gpio bank C shares pins with anything? Mar 07 20:09:15 [g2-lap]: at least, can't find any relevant bits in the DeviceCfg register Mar 07 20:09:46 anyway, let me know if this works Mar 07 20:10:29 <[g2-lap]> lennert C and D share with the keyboard Mar 07 20:11:12 <[g2-lap]> page 762 of the cirrus logic 9312 doc Mar 07 20:11:56 ah Mar 07 20:12:03 <[g2-lap]> I guess the default function is row/col Mar 07 20:12:04 hmmmmm Mar 07 20:12:19 so we need to configure GonK mode Mar 07 20:12:31 hmmo k Mar 07 20:12:38 you can't find port a/b anywhere? Mar 07 20:12:46 <[g2-lap]> I can look Mar 07 20:13:18 setting GonK is enabling bit 27 in DeviceCfg Mar 07 20:13:45 ok Mar 07 20:13:48 that is unsafe, actually Mar 07 20:13:55 kernelspace is writing to that register too Mar 07 20:14:07 anyway, we can hope it goes ok Mar 07 20:14:10 i'll code it up Mar 07 20:14:21 <[g2-lap]> lennert hold on for a minute Mar 07 20:14:44 <[g2-lap]> I can look for a couple minutes if A or B comes out Mar 07 20:14:48 ok Mar 07 20:14:51 that would be better Mar 07 20:14:57 it'd be compatible with the ts72xx too Mar 07 20:14:57 <[g2-lap]> ideally they'd be nice as A/B come out on the 9302 Mar 07 20:15:02 yeah Mar 07 20:15:08 not sure whether 9302 has c/d Mar 07 20:15:14 <[g2-lap]> then we'd just have 1 or 2 configs Mar 07 20:15:23 <[g2-lap]> if the pinouts are different between ts and glo Mar 07 20:18:42 ok, implemented Mar 07 20:19:04 we have a function, set_gonk_mode(), that enables G-on-K Mar 07 20:21:39 <[g2-lap]> lennert we're gonna have to go with that as A/B are not brought out on the 12 Mar 07 20:21:45 <[g2-lap]> 9312 that is Mar 07 20:25:12 ok Mar 07 20:25:14 <[g2-lap]> cool Mar 07 20:25:22 this module just hardcodes port C and forces GonKL to be on Mar 07 20:25:26 that should really be a config option Mar 07 20:25:30 <[g2-lap]> koen thx for stopping by Mar 07 20:25:44 <[g2-lap]> lennert that's fine for now Mar 07 20:25:46 [g2-lap]: http://ewi546.ewi.utwente.nl/tmp/viewmtn/revision.psp?id=bae20f6f5bee8712c32266160866a282d7948bf4 Mar 07 20:25:57 he packaged openocd for OE Mar 07 20:26:19 <[g2-lap]> koen I'll pull and test later Mar 07 20:26:34 <[g2-lap]> there are two things to test now Mar 07 20:26:42 1) does it compile Mar 07 20:27:11 <[g2-lap]> lennert I've got everything build except our changes already Mar 07 20:27:32 our change is what i wonder about Mar 07 20:27:46 <[g2-lap]> so 1) is testing the changes so we can give them to vmaster for "upstream" Mar 07 20:27:51 yup Mar 07 20:28:08 <[g2-lap]> then 2) is roll that into OE Mar 07 20:28:15 that should happen automatically Mar 07 20:28:28 <[g2-lap]> right on the next pull and there's little config issues Mar 07 20:28:39 currently openocd expects to have everything in a local filesystem, including binaries you want to upload to the target Mar 07 20:28:52 that might have to be changed when running openocd on a sbc like the ts7200 Mar 07 20:29:09 or you require nfs Mar 07 20:29:12 <[g2-lap]> right as we've got a 5MB jffs2 Mar 07 20:29:34 <[g2-lap]> we can run in a chroot to Mar 07 20:29:57 72K ../../../../deploy/ipk/openocd_svn-r0_armv5te.ipk Mar 07 20:30:06 ok, let me know when you've tested the ep93xx module Mar 07 20:30:30 <[g2-lap]> lennert let's get all the changes together Mar 07 20:30:47 ? Mar 07 20:30:50 <[g2-lap]> I've got jtag.c modified Mar 07 20:31:02 <[g2-lap]> and I can pull your ep93xx.c Mar 07 20:31:05 ok Mar 07 20:31:10 you need vmaster's ep93xx first Mar 07 20:31:13 mine is just a diff Mar 07 20:31:19 <[g2-lap]> ok I've got his Mar 07 20:31:22 ok Mar 07 20:38:59 <[g2-lap]> vmaster so do modify the Makefile.am or .in ? Mar 07 20:39:53 <[g2-lap]> lennert koen feel free to jump in Mar 07 20:40:11 <[g2-lap]> I've got the ep93xx patches and the jtag.c updated Mar 07 20:40:28 <[g2-lap]> I just need to correct the automake and then configure and build Mar 07 20:40:45 <[g2-lap]> but I don't know whether to modify the .in or .am Mar 07 20:41:25 iirc the .in Mar 07 20:43:10 <[g2-lap]> doh I'm modifing the am Mar 07 20:43:36 <[g2-lap]> which it think may be correct as it's got the earlier timestamp Mar 07 20:43:58 the .am makes the .in, and the .in makes the configure, no? Mar 07 20:44:16 hmmm.. ignore that, i don't know what i'm talking about :) Mar 07 20:44:23 don't forget about configure.ac ;) Mar 07 20:45:35 <[g2-lap]> koen you mean like this ? Mar 07 20:45:38 <[g2-lap]> ./bootstrap Mar 07 20:45:38 <[g2-lap]> src/jtag/Makefile.am:42: EP93XX does not appear in AM_CONDITIONAL Mar 07 20:45:40 <[g2-lap]> :) Mar 07 20:46:25 <[g2-lap]> I don't think there's a .ac Mar 07 20:46:29 (btw, it won't really compile unless you add sys/mman.h and unistd.h i think) Mar 07 20:46:34 <[g2-lap]> we run ./bootstrap then ./configure Mar 07 20:46:56 <[g2-lap]> lennert trust but verify :) Mar 07 20:48:02 [g2-lap]: i didn't have a copy of openocd to work from :P Mar 07 20:50:42 in src/jtag/Makefile.am, add a block like "if FTD2XX ..." Mar 07 20:51:18 and add $(EP93XXFILES) to the libjtag_a_SOURCES line Mar 07 20:51:58 then modify configure.in Mar 07 20:52:21 just duplicate something like the ftd2xx part Mar 07 20:54:40 <[g2-lap]> vmaster I think I've got it Mar 07 20:54:57 <[g2-lap]> I'm just hammering the build_ep93xx=yes at the top level Mar 07 20:55:10 <[g2-lap]> but other than the conditional and the code actually compiling it's working Mar 07 20:55:27 <[g2-lap]> now we'll sort out the compile issues Mar 07 20:56:07 actually, i can do that Mar 07 20:56:11 <[g2-lap]> http://pastebin.ca/44819 Mar 07 20:56:15 most of the things i wanted to do today i didn't get done anyway Mar 07 20:56:20 <[g2-lap]> cause I know you guys are _dying_ Mar 07 20:56:25 <[g2-lap]> heh Mar 07 20:56:33 looks very good actually Mar 07 20:56:33 <[g2-lap]> ok so sys/.... Mar 07 20:56:37 you need sys/mman.h Mar 07 20:56:42 unistd.h i suppose Mar 07 20:56:58 can you try again then? Mar 07 20:58:23 <[g2-lap]> houston slight problem Mar 07 20:58:37 <[g2-lap]> the include path for the 93xx stuff Mar 07 20:59:10 ? Mar 07 20:59:29 <[g2-lap]> strike that Mar 07 20:59:40 <[g2-lap]> it's the normal kernel headers Mar 07 21:00:42 okay Mar 07 21:03:04 <[g2-lap]> do I want kernel-package ? Mar 07 21:03:25 <[g2-lap]> basically my choort doesn't have the kernel development stuff Mar 07 21:03:40 <[g2-lap]> s/choort/chroot/ Mar 07 21:03:41 [g2-lap] meant: basically my chroot doesn't have the kernel development stuff Mar 07 21:03:59 <[g2-lap]> I've got the linux-kernel-headers installed Mar 07 21:10:49 <[g2-lap]> gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src/helper -g -O2 -c ep93xx.c Mar 07 21:10:49 <[g2-lap]> ep93xx.c: In function `ep93xx_init': Mar 07 21:10:49 <[g2-lap]> ep93xx.c:158: error: `O_RDWR' undeclared (first use in this function) Mar 07 21:10:49 <[g2-lap]> ep93xx.c:158: error: (Each undeclared identifier is reported only once Mar 07 21:10:49 <[g2-lap]> ep93xx.c:158: error: for each function it appears in.) Mar 07 21:10:50 <[g2-lap]> ep93xx.c:158: error: `O_SYNC' undeclared (first use in this function) Mar 07 21:11:11 either fcntl.h, sys/stat.h or sys/types.h Mar 07 21:11:14 i assume fcntl.h Mar 07 21:11:25 (i.e. add "#include " somewhere Mar 07 21:12:59 <[g2-lap]> ok jtag compiles and links Mar 07 21:13:15 <[g2-lap]> I think we are just missing the arm9_ep93xx config Mar 07 21:14:05 take the arm9_ftd2xx.cfg, replace 'interface ftd2xx' with 'interface ep93xx' and you're done Mar 07 21:14:05 <[g2-lap]> vmaster ? Mar 07 21:14:06 whee, it builds Mar 07 21:14:11 hehe Mar 07 21:14:12 <[g2-lap]> whee Mar 07 21:14:19 an answer almost even before you ask the question ;) Mar 07 21:14:25 <[g2-lap]> ok Mar 07 21:19:05 * [g2-lap] shutsdown on the loft and moves drive to the ep93xx Mar 07 21:19:09 <[g2-lap]> and boots there Mar 07 21:20:30 <[g2-lap]> Um.... you know I could run this on the 9302 TS too Mar 07 21:21:07 you'd have to change the code to use bank A though Mar 07 21:21:12 and then use the 'LCD' connector on the board Mar 07 21:22:56 the rightmost 4 rows of 2 pins (i.e. the pins closest to the backplane) are EGPIO0..7 (which are on bank A) Mar 07 21:24:31 how much faster would this ep93xx jtag be compared to a parallel port 'wiggler'? Mar 07 21:24:49 a wiggler achieves ~350kHz Mar 07 21:25:04 that ep93xx jtag could probably achieve 5 MHz, maybe more Mar 07 21:25:12 <[g2-lap]> vmaster that's a TCLK rate right ? Mar 07 21:25:17 yes Mar 07 21:25:20 <[g2-lap]> tom@ep93xx:~/openocd$ ./src/openocd -f doc/configs/arm9_ep93xx.cfg Mar 07 21:25:20 <[g2-lap]> Error: jtag.c:1086 jtag_init(): No valid jtag interface found (ep93xx) Mar 07 21:25:31 [g2-lap]: have to run it as root Mar 07 21:25:38 <[g2-lap]> heh Mar 07 21:25:39 [g2-lap]: or set /dev/mem so that you can access it Mar 07 21:25:46 [g2-lap]: sorry, that's the only way to access the gpio controller Mar 07 21:26:14 this is another problem Mar 07 21:26:29 <[g2-lap]> yeah as confirmed :) Mar 07 21:26:48 you could use parport if you didn't care about speed Mar 07 21:26:54 i.e. the kernel parport stuff Mar 07 21:26:58 same for the GPIOs Mar 07 21:27:51 * koen is watching the openocd video from FOSDEM Mar 07 21:29:01 [g2-lap]: can you send me a tarball of your sources? that would save me from modifying the auto stuff myself ;) Mar 07 21:32:52 <[g2-lap]> vmaster sure Mar 07 21:33:02 <[g2-lap]> actually I can send you a diff Mar 07 21:33:14 <[g2-lap]> from r47 Mar 07 21:34:58 that would be nice Mar 07 21:36:37 <[g2-lap]> vmaster http://pastebin.ca/44830 Mar 07 21:36:49 <[g2-lap]> that plus the ep93xx.c Mar 07 21:37:00 <[g2-lap]> and the .cfg Mar 07 21:37:08 hmm... what's the openocd stuff? Mar 07 21:37:24 <[g2-lap]> vmaster's project Mar 07 21:37:34 <[g2-lap]> the one he gave a talk about at fosdem Mar 07 21:37:40 [g2-lap]: + &_ep93xx_interface, Mar 07 21:37:42 [g2-lap]: so does it work? Mar 07 21:38:02 <[g2-lap]> vmaster ah _ Mar 07 21:38:04 the first underscore shouldn't be there Mar 07 21:38:05 yeah Mar 07 21:38:10 <[g2-lap]> ok Mar 07 21:42:46 <[g2-lap]> Ok the date's all hosed I'm rebooting into debain on the glomation Mar 07 21:42:57 <[g2-lap]> I was running from the OE flash Mar 07 21:43:09 <[g2-lap]> and didn't have networking/time up Mar 07 21:43:42 the patch also linewrapped in pastebin Mar 07 21:43:55 line 35/36 and 42/43 Mar 07 21:55:05 <[g2-lap]> hmmm Mar 07 21:55:20 <[g2-lap]> I've rebuilt and the code looks right but same thing Mar 07 21:55:42 <[g2-lap]> ./src/openocd -f doc/configs/arm9_ep93xx.cfg Mar 07 21:55:42 <[g2-lap]> Error: jtag.c:1086 jtag_init(): No valid jtag interface found (ep93xx) Mar 07 21:55:42 <[g2-lap]> EP9312-1:/home/tom/openocd# grep ep93xx src/jtag/jtag.c Mar 07 21:55:42 <[g2-lap]> extern jtag_interface_t ep93xx_interface; Mar 07 21:55:42 <[g2-lap]> &ep93xx_interface, Mar 07 21:56:03 can't help with that.. Mar 07 21:58:18 <[g2-lap]> vmaster should it be call invoking ep93xx_interface ? Mar 07 21:58:34 ep93xx_interface is just the structure defining some function pointers Mar 07 21:59:14 remove the #if BUILD_EP93XX, and see if it works Mar 07 21:59:35 <[g2-lap]> ls Mar 07 21:59:45 i guess there's something wrong with the auto scripts Mar 07 21:59:59 otherwise it should have complained about the extra underscore (undefined reference) Mar 07 22:01:23 <[g2-lap]> ./src/openocd -f doc/configs/arm9_ep93xx.cfg Mar 07 22:01:23 <[g2-lap]> Segmentation fault Mar 07 22:01:45 <[g2-lap]> lemme check cpualignment Mar 07 22:02:00 whoops Mar 07 22:02:05 does it work without the ep93xx driver, guess so? Mar 07 22:02:33 he can't test without, i guess Mar 07 22:02:44 the other drivers don't work on an ARM Mar 07 22:02:48 i wonder where it is segfaulting Mar 07 22:02:59 hmm yeah Mar 07 22:02:59 run openocd with -d Mar 07 22:03:08 and show me the lines before it segfaults Mar 07 22:03:26 <[g2-lap]> ./src/openocd -d -f doc/configs/arm9_ep93xx.cfg Mar 07 22:03:26 <[g2-lap]> Debug: jtag.c:1043 jtag_init(): Mar 07 22:03:26 <[g2-lap]> Segmentation fault Mar 07 22:03:30 :-( Mar 07 22:03:32 can you run in gdb? Mar 07 22:04:43 ep93xx_init is the first thing called after the ep93xx_interface struct was found Mar 07 22:04:48 <[g2-lap]> I'm trying strace first :) Mar 07 22:06:10 <[g2-lap]> munmap(0x40015000, 4096) = 0 Mar 07 22:06:10 <[g2-lap]> open("/dev/mem", O_RDWR|O_SYNC) = 3 Mar 07 22:06:10 <[g2-lap]> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0x80840000) = 0x40015000 Mar 07 22:06:10 <[g2-lap]> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0x80930000) = 0x40016000 Mar 07 22:06:10 <[g2-lap]> munmap(0x40016000, 4096) = 0 Mar 07 22:06:11 <[g2-lap]> --- SIGSEGV (Segmentation fault) @ 0 (0) --- Mar 07 22:06:13 <[g2-lap]> +++ killed by SIGSEGV +++ Mar 07 22:06:37 it completed set_gonk_mode() fine Mar 07 22:07:12 can you print gpio_data_register/gpio_data_direction register before " Configure bit 0" ? Mar 07 22:07:16 i suspect they might not get set at all Mar 07 22:07:19 :P Mar 07 22:13:47 <[g2-lap]> ./src/openocd -f doc/configs/arm9_ep93xx.cfg Mar 07 22:13:47 <[g2-lap]> gpio_data_register = 00000000 Mar 07 22:13:47 <[g2-lap]> gpio_data_direction_reg = 00000000 Mar 07 22:13:47 <[g2-lap]> Segmentation fault Mar 07 22:13:54 <[g2-lap]> like that ? Mar 07 22:14:42 <[g2-lap]> lennert is that what you wanted ? Mar 07 22:17:24 <[g2-lap]> dinner time Mar 07 22:39:06 <[g2-lap]> lennert ping Mar 07 22:39:45 <[g2-lap]> koen ping Mar 07 22:39:57 [23:15] -!- koen is now known as koen|sleep Mar 07 22:40:04 <[g2-lap]> oh ok Mar 07 22:40:58 <[g2-lap]> vmaster I'm thinking the may be related to the a difference in kernel headers between 2.6.8 and 2.6.16-rc5 Mar 07 22:53:33 right Mar 07 22:53:35 why are they zero? Mar 07 22:53:45 can you uncomment the bit where it assigns the stuff for port c? Mar 07 22:53:51 i probably made some really obvious mistake Mar 07 22:54:20 just delete all the rest, just the "Use GPIO port C." bit Mar 07 22:55:07 probably done at 4am bleary eyed Mar 07 22:56:19 11pm under pressure from seven sides Mar 07 22:56:38 ya Mar 07 23:01:18 okay, i'm heading to bed, n8 everyone Mar 07 23:01:27 vmaster: good night, thanks for the help Mar 07 23:01:31 [g2-lap]: you there? Mar 07 23:01:43 sorry for being away, i was following a political debate on tv ;p Mar 07 23:06:22 local? Mar 07 23:08:12 yeah Mar 07 23:08:20 local (city council) elections Mar 07 23:08:26 in every city in .nl Mar 07 23:08:45 and a debate afterwards on tv between the leaders of the biggest political parties Mar 07 23:57:37 <[g2-lap]> lennert ping Mar 07 23:57:53 pong Mar 07 23:58:00 <[g2-lap]> I'm back Mar 07 23:58:10 <[g2-lap]> out with the kids a little Mar 07 23:58:10 good Mar 07 23:58:13 nice Mar 07 23:58:17 i was watching a political debate Mar 07 23:58:23 the first i've seen in 6 years Mar 07 23:58:24 anyway Mar 07 23:58:26 <[g2-lap]> heh Mar 07 23:58:31 can you try uncommenting the gpio port c stuff? Mar 07 23:58:39 just put the a/b/d stuff between #if 0 Mar 07 23:58:44 i probably messed those up somehow Mar 07 23:58:52 <[g2-lap]> Ok Mar 07 23:58:57 it should work then Mar 08 00:00:51 <[g2-lap]> lennert :) Mar 08 00:00:57 <[g2-lap]> ./src/openocd -d -f doc/configs/arm9_ep93xx.cfg Mar 08 00:00:57 <[g2-lap]> Debug: jtag.c:1043 jtag_init(): Mar 08 00:00:57 <[g2-lap]> gpio_data_register = 40015008 Mar 08 00:00:57 <[g2-lap]> gpio_data_direction_reg = 40015018 Mar 08 00:00:57 <[g2-lap]> Debug: jtag.c:937 jtag_reset_callback(): Mar 08 00:00:58 <[g2-lap]> Debug: jtag.c:937 jtag_reset_callback(): Mar 08 00:01:00 <[g2-lap]> Error: jtag.c:989 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch Mar 08 00:01:02 that's much better Mar 08 00:01:04 hmmm Mar 08 00:01:09 nothing connected? :P Mar 08 00:01:14 <[g2-lap]> right Mar 08 00:01:22 can you check if something happens on TCK? Mar 08 00:01:33 for example.. delay one second every time TCK/TDO/TMS get changed Mar 08 00:01:37 just put a sleep(1); in there Mar 08 00:01:45 and check with your meter whether the pin for TCK toggles Mar 08 00:02:06 <[g2-lap]> yeah I could Mar 08 00:02:30 <[g2-lap]> I think just working out the pinouts and connecting it up to something will help Mar 08 00:02:35 yup Mar 08 00:02:38 make sure the levels match Mar 08 00:02:49 <[g2-lap]> I want to check the levels too before hooking it up to a board Mar 08 00:02:50 or put some converter in between Mar 08 00:02:51 yeah Mar 08 00:03:02 <[g2-lap]> I've got plenty of boards Mar 08 00:03:15 you do :P Mar 08 00:03:20 <[g2-lap]> I think there are 4 gounds on the bottom of that connector Mar 08 00:03:35 <[g2-lap]> that connector being the keyboard connectors Mar 08 00:03:46 <[g2-lap]> so I think we can have a reasonable ground connection Mar 08 00:04:47 <[g2-lap]> I think I could just pull the init code out and drive the IOs directly Mar 08 00:04:54 <[g2-lap]> in a little program Mar 08 00:04:59 sure Mar 08 00:05:33 <[g2-lap]> it kinda amazing this was just an idea about 48 hours ago if that Mar 08 00:05:49 <[g2-lap]> at least to me anyway Mar 08 00:05:56 well, yeah Mar 08 00:06:01 you prodded me to check the gpio speed Mar 08 00:06:07 i checked and remarked we could do jtag with that Mar 08 00:06:19 <[g2-lap]> step by step.. Mar 08 00:06:22 <[g2-lap]> inch by inch Mar 08 00:06:31 <[g2-lap]> boom there you are :) Mar 08 00:06:31 ferrari by ferrari Mar 08 00:06:51 <[g2-lap]> speed-o-light by speed-o-light :) Mar 08 00:15:06 <[g2-lap]> Ok I'm I've got pins 1 3 5 7 9 11 hooked up on the header Mar 08 00:15:16 <[g2-lap]> s/I'm// Mar 08 00:15:16 [g2-lap] meant: Ok I've got pins 1 3 5 7 9 11 hooked up on the header Mar 08 00:34:04 <[g2-lap]> lennert I'm getting some values Mar 08 00:34:10 <[g2-lap]> they are 3.3v Mar 08 00:40:40 <[g2-lap]> lennert I'm driving TCLK Mar 08 00:40:55 <[g2-lap]> ~ 1H Mar 08 00:41:32 <[g2-lap]> while (1) Mar 08 00:41:32 <[g2-lap]> { Mar 08 00:41:32 <[g2-lap]> *gpio_data_register = *gpio_data_register ^ TCK_BIT; Mar 08 00:41:32 <[g2-lap]> sleep (1); Mar 08 00:41:32 <[g2-lap]> } Mar 08 00:42:04 * [g2-lap] forgets if there's a ^= idiom Mar 08 00:42:10 <[g2-lap]> or maybe that's perl Mar 08 00:43:08 <[g2-lap]> I guess there is :) Mar 08 00:53:08 <[g2-lap]> vmaster around ? Mar 08 01:06:46 * dwery thinks he is missing something interesting... Mar 08 01:17:40 <[g2-lap]> I wanted to ask what would happen if I was hooked up to a wrong device Mar 08 01:17:59 <[g2-lap]> if it'd just scan the device and report back Mar 08 01:18:26 <[g2-lap]> dwery I think openOCD is running on my glomation board Mar 08 01:18:43 openOCD is a jtag tool, right? Mar 08 01:18:47 <[g2-lap]> dunno if you followed the measurements lennert made yesterday Mar 08 01:18:53 <[g2-lap]> yup vmaster's Mar 08 01:18:57 I gave a quick look Mar 08 01:19:10 and you are using gpio to do it, right? Mar 08 01:19:13 <[g2-lap]> we should be able to drive near 8Mhz Mar 08 01:19:20 <[g2-lap]> yeah Mar 08 01:19:25 <[g2-lap]> bit bang'n Mar 08 01:19:37 so this is considerably faster than the method that were available as of today? Mar 08 01:19:55 <[g2-lap]> vmaster was saying the parallel today is about 350K Mar 08 01:20:19 <[g2-lap]> so if we go to 4M it'll be 10x+ faster Mar 08 01:20:32 ok.. what are openOCD capabilities in terms of flash/cpld programming? Mar 08 01:21:05 <[g2-lap]> I think there's some flashing, but more important there's some debug capability Mar 08 01:21:12 great! Mar 08 01:21:16 <[g2-lap]> we'll be able to debug boot code etc... Mar 08 01:21:24 <[g2-lap]> or kernel stuff Mar 08 01:21:32 and congrats Mar 08 01:22:08 <[g2-lap]> well it's not all done yet but we've made great progress Mar 08 01:22:22 <[g2-lap]> thx from the team :) Mar 08 01:22:43 <[g2-lap]> beewoolie's stuff it built too Mar 08 01:23:00 <[g2-lap]> but there's no gpio driver yet Mar 08 01:23:26 <[g2-lap]> vmaster has a telenet and gdb backend/front-end Mar 08 01:23:34 <[g2-lap]> which ever end you think of it aas Mar 08 01:23:36 <[g2-lap]> as Mar 08 08:27:39 good morning all Mar 08 08:28:15 morning Mar 08 08:28:49 mawnin Mar 08 08:28:57 good yawnin' Mar 08 08:29:02 [g2-lap]: sorry, i fell asleep Mar 08 09:45:31 <[g2]> lennert great! sleep is a good thing :) Mar 08 09:49:24 <[g2]> vmaster up yet ? Mar 08 09:51:45 [g2]: yeah Mar 08 09:52:15 <[g2]> vmaster the port C stuff was toggling the GPIO lines last night Mar 08 09:52:23 oh, nice Mar 08 09:52:28 <[g2]> I had an LED on a 1 second Mar 08 09:52:51 <[g2]> Light Dark Light Dark .... Mar 08 09:53:14 the openocd verifies that the specified jtag chain is correct, by doing an instruction register scan Mar 08 09:53:21 <[g2]> So my question for you was about OCD Mar 08 09:53:38 <[g2]> does it print out the result ? Mar 08 09:53:53 it quits if the check failed Mar 08 09:54:02 but you can enable extensive debug logging Mar 08 09:54:03 <[g2]> sure (as it should) Mar 08 09:54:04 in jtag.h Mar 08 09:54:31 there's a #define _DEBUG_JTAG_IO_ Mar 08 09:54:34 <[g2]> I meant it should fail that's a good sanity check Mar 08 09:54:46 <[g2]> I saw that the other ay Mar 08 09:54:50 <[g2]> s/ay/day/ Mar 08 09:54:50 [g2] meant: I saw that the other day Mar 08 09:55:41 <[g2]> and right now there's arm7 and arm9 but now Xscale support right ? Mar 08 09:55:48 yeah Mar 08 09:56:01 i've started looking into xscale, but this is going to take some time Mar 08 09:56:45 <[g2]> sure Mar 08 09:57:05 <[g2]> I'm not too worried about that Mar 08 09:57:55 <[g2]> you currently have some gdb support for arm7 and arm9 right ? Mar 08 09:58:03 yeah Mar 08 09:58:31 well, generic gdb support, as long as the target specific code implements the interface defined in target.h Mar 08 09:58:33 <[g2]> so if we wanted to use openOCD do debug say a bootloader on the ARM9 we could Mar 08 09:58:38 yes Mar 08 09:58:52 <[g2]> that's _just_ _cool_ Mar 08 10:00:59 <[g2]> Ok I'll see if I can dig up a arm9 target that's got JTAG brought ut Mar 08 10:01:05 <[g2]> s/ut/out/ Mar 08 10:01:06 [g2] meant: Ok I'll see if I can dig up a arm9 target that's got JTAG brought out Mar 08 10:02:04 you can test the jtag functionality with anything that's got a jtag connector Mar 08 10:02:35 the telnet interface offers low-level jtag commands, like ir-scans, dr-scans, runtest, etc. Mar 08 10:03:12 <[g2]> Ok Mar 08 10:03:32 <[g2]> so I don't need to enable the low-level stuff Mar 08 10:04:09 the low level commands are always there Mar 08 10:04:22 the target commands are only there when a valid "target ..." configuration line was found Mar 08 10:05:50 <[g2]> vmaster around for 5 minutes ? Mar 08 10:06:09 for several hours, i guess Mar 08 10:07:22 <[g2-lap]> I'm like 6 pins being hooked up to a CPLD Mar 08 10:07:41 <[g2-lap]> then we can run the telnet and and do some JTAG scans Mar 08 10:08:02 yeah Mar 08 10:08:17 if it's a coolrunner you could even program it Mar 08 10:08:47 <[g2-lap]> XC9572 Mar 08 10:08:58 well, could work, too, but not tested yet Mar 08 10:09:03 mhh, maybe not Mar 08 10:09:17 but at least you can scan the idcode Mar 08 10:09:45 <[g2-lap]> that's all we really need Mar 08 10:09:56 <[g2-lap]> then POC is done Mar 08 10:10:06 <[g2-lap]> that uses all the lines right ? Mar 08 10:10:21 tdi, tms, tck and tdo would be enough Mar 08 10:10:26 trst makes things easier Mar 08 10:10:41 srst is only required to do target resets (and mandatory for xscale) Mar 08 10:11:06 <[g2-lap]> ok 4 of the lines which is plenty Mar 08 10:11:14 <[g2-lap]> plenty for POC Mar 08 10:22:11 that's the jtag_device line you should use for a xc9500: Mar 08 10:22:12 jtag_device 8 0x01 0x03 0xfe Mar 08 10:22:41 8 bit IR register, captures 0x1 during Capture-IR, first 2 bits should be checked, idcode instruction is 0xfe Mar 08 10:29:42 <[g2-lap]> vmaster OK I'm ready to go Mar 08 10:30:10 <[g2-lap]> do I pass a config if I'm just gonna telnet in ? Mar 08 10:30:17 yeah Mar 08 10:30:21 hold on Mar 08 10:31:44 * [g2-lap] guesses we should just make a xc95xx_ep93xx.cnf Mar 08 10:32:02 mmd.ath.cx/xc9500.cfg Mar 08 10:34:04 <[g2-lap]> ./src/openocd -d -f doc/configs/xc9500.cfg Mar 08 10:34:04 <[g2-lap]> Debug: jtag.c:1043 jtag_init(): Mar 08 10:34:04 <[g2-lap]> gpio_data_register = 40015008 Mar 08 10:34:04 <[g2-lap]> gpio_data_direction_reg = 40015018 Mar 08 10:34:04 <[g2-lap]> Debug: jtag.c:937 jtag_reset_callback(): Mar 08 10:34:05 <[g2-lap]> Debug: jtag.c:937 jtag_reset_callback(): Mar 08 10:34:06 <[g2-lap]> Error: jtag.c:989 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch Mar 08 10:34:32 can you recompile with _DEBUG_JTAG_IO_? Mar 08 10:34:39 <[g2-lap]> sure Mar 08 10:34:49 * [g2-lap] would be happy to :) Mar 08 10:35:07 <[g2-lap]> BTW thx for taking the time for all the hand-holding with me ! Mar 08 10:35:30 heh, thx for porting the openocd to your platform Mar 08 10:38:23 <[g2-lap]> my pleasure :) Mar 08 10:38:37 <[g2-lap]> I guess we are your 1st port ? Mar 08 10:38:45 <[g2-lap]> ./src/openocd -d -f doc/configs/xc9500.cfg Mar 08 10:38:45 <[g2-lap]> Debug: jtag.c:1044 jtag_init(): Mar 08 10:38:45 <[g2-lap]> gpio_data_register = 40015008 Mar 08 10:38:45 <[g2-lap]> gpio_data_direction_reg = 40015018 Mar 08 10:38:45 <[g2-lap]> Debug: jtag.c:938 jtag_reset_callback(): Mar 08 10:38:45 <[g2-lap]> Debug: jtag.c:825 jtag_build_buffer(): fields[0].out_value: 03ff Mar 08 10:38:47 <[g2-lap]> Debug: jtag.c:856 jtag_read_buffer(): fields[0].in_value: 03ff Mar 08 10:38:49 <[g2-lap]> Debug: jtag.c:938 jtag_reset_callback(): Mar 08 10:38:53 <[g2-lap]> Error: jtag.c:990 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch Mar 08 10:40:52 <[g2-lap]> vmaster lennert I just added and extra bit VCC_BIT (64) to pull VCC from Mar 08 10:41:51 it reads back all 1s Mar 08 10:42:06 so either the output or the input didn't work :) Mar 08 10:42:46 <[g2-lap]> vmaster I've got a 4 led segment I can drive Mar 08 10:43:03 <[g2-lap]> we can check the 3 output pins Mar 08 10:43:11 <[g2-lap]> then check the 1 input Mar 08 10:45:51 ok, tck and tdi should start at 0, tms should start at 1 Mar 08 10:46:10 then tck should toggle 7 times Mar 08 10:48:09 wow, lots of discussion Mar 08 10:48:11 * lennert reads backlog Mar 08 10:49:37 i _think_ i did the reset values correctly **** ENDING LOGGING AT Wed Mar 08 10:59:56 2006