**** BEGIN LOGGING AT Mon Aug 17 02:59:56 2009 Aug 17 19:28:32 Hello. I'm trying to figure out how to connect OpenOCD to a chip, but the datasheet has too much detail. Aug 17 19:40:39 you need to find at least tck, tdi, tdo and tms Aug 17 19:41:06 trst and srst can be necessary, depending on the core Aug 17 19:51:36 It's connected, but I'm having issues with configuration. Aug 17 19:51:39 It's an ARM7tdmi Aug 17 19:52:04 I know that it has three scan chains. 0 is full boundary of core, 1 is bus subset, 2 is ICE. Aug 17 19:52:10 Is that any standard tdmi? Aug 17 19:52:45 no idea Aug 17 19:53:13 but i think you should be to at least get the idcode Aug 17 19:53:48 All I know so far is that the full IR len is 12. Aug 17 19:54:08 urjtag started doing an exhaustive search finding the DRs of all possible instructions. Aug 17 19:54:19 Didn't find anything useful. Aug 17 19:54:27 did it show you the id? Aug 17 19:54:32 no. Aug 17 19:54:37 weird Aug 17 19:55:06 um, why pm? Aug 17 19:55:10 The part is an sta8058. Aug 17 19:55:16 Afraid of flood-ban Aug 17 19:55:28 for three lines? Aug 17 19:55:33 use a pastebin then... Aug 17 19:55:35 I think it's happened before. Aug 17 19:55:36 ok. Aug 17 19:56:24 either way, 7e1e1e1f looks fishy... Aug 17 19:56:43 http://pastebin.ca/1532910 Aug 17 19:57:02 I don't actually know anything about what the idcodes should be. Aug 17 19:57:51 well, you can try replacing fc3c3c3f by 7e1e1e1f Aug 17 19:58:24 I'm not even sure if the flash exists on the scan chain. Aug 17 19:58:32 It's a multi-chip-module. Aug 17 19:58:35 unlikely Aug 17 19:58:53 wait Aug 17 19:59:00 you mean boundary scan? Aug 17 19:59:18 I thought I had to declare it in the chain even if I'm not using it directly. Aug 17 19:59:22 Error: number of discovered devices in JTAG chain (2) does not match (enabled) configuration (1), total taps: 1 Aug 17 19:59:42 hmm so it found only one device Aug 17 19:59:58 Uh, vice-versa, I got rid of the flash newtap line. Aug 17 20:00:10 ah Aug 17 20:00:36 well it's unlikely than the flash will be in jtag tap chain Aug 17 20:01:01 ok Aug 17 20:01:06 usually you either access it via boundary scan or using cpu's debug mode Aug 17 20:02:53 Datasheet quote: "In this case, the user can store its own "loader" in the internal RAM through JTAG, in a way suitable for production programming equipment. The detailed procedure will be released and described in a separate document." Aug 17 20:03:16 yeah that's what openocd does Aug 17 20:03:31 And that's what I'm trying to configure it to do. Aug 17 20:03:41 it uploads a small code that runs in the core and sends results via jtag Aug 17 20:04:05 anyway, first you need to make openocd recognize the devices Aug 17 20:04:42 Info : JTAG tap: sta8058.cpu tap/device found: 0x7e1e1e1f (mfg: 0x70f, part: 0xe1e1, ver: 0x7) Aug 17 20:04:43 Info : JTAG Tap/device matched Aug 17 20:04:45 Warn : Tap/Device does not have IDCODE Aug 17 20:04:51 o.O Aug 17 20:04:58 never seen this one... Aug 17 20:05:19 So, perhaps that's not actually an ARM core, and I should be targeting the next device in the chain? Aug 17 20:06:15 no idea really... Aug 17 20:06:20 Well, the next item in the chain has a tapid of 0x00000000 Aug 17 20:07:25 I can't imagine that's an arm7tdmi Aug 17 20:54:22 Well, I've figured something out. Aug 17 20:54:28 I have my reset_config wrong. Aug 17 20:54:33 Now, I just need to figure out what it should be. Aug 17 21:31:22 roxfan: Is it possible to autodetect the reset_config? Aug 17 21:31:52 umm don't think so Aug 17 21:32:06 Where can I find a list of all possible flags to try? Aug 17 21:32:16 in the doc? Aug 17 21:32:26 Doesn't appear to be there. Aug 17 21:32:50 http://openocd.berlios.de/doc/html/Reset-Configuration.html makes no mention of a complete list of values. Aug 17 21:34:38 Possible values are none (the default), trst_only, srst_only and trst_and_srst. Aug 17 21:34:41 etc Aug 17 21:36:10 srst_only and trst_only both fail to reset the device. Aug 17 21:36:18 OpenOCD can only connect immediately after a power cycle. Aug 17 21:36:35 Given that, is there any chance of it working without needing a power cycle? Aug 17 21:36:39 are you sure those signals are connected? Aug 17 21:37:05 Reasonably. I'll have to check the schematic, but I think so. Aug 17 21:37:45 If neither of them works, though, will I always have to power-cycle the device before it'll connect? Aug 17 21:41:00 well, i think usually openocd should be able to break the running target **** ENDING LOGGING AT Tue Aug 18 02:59:56 2009