**** BEGIN LOGGING AT Fri May 15 02:59:58 2009 May 15 06:35:47 zwelch: I have no clue, I'm just playing around. :) May 15 06:36:34 zwelch: there's also a MPC8245, but even though it detects it I cannot find any flash part with 'detectflash' on any of the popular rom bases. It always gives '00' or 'ff', so there's probably something wrong/different. May 15 06:37:23 actually, i wonder if that could be a symptom of a flash protection feature May 15 06:37:51 if it is like some other chips, you would be able to read it once you erased it... but you probably do not want to do that, eh? :) May 15 06:37:58 kinda defeats the purpose May 15 06:38:11 zwelch: do you mean the PLD or the Flash ROM attached to the MPC8245? May 15 06:38:20 both, actually :) May 15 06:38:37 With the Flash ROM, I do imagine at least the identification to work. May 15 06:38:46 if the network switch is from cisco or a similar brand, i would virtually guarantee this is the case May 15 06:38:57 they would not let anyone sniff their bits May 15 06:39:10 yes, that is true... id should be possible, or how would you erase it? :/ May 15 06:39:12 It's a 3com 3870, ES4649 and Dell PowerConnect 3324. May 15 06:39:25 They're all from the same ODM, Accton(.com.tw). May 15 06:39:41 I've been playing with and disassembling them for a while now. May 15 06:39:51 these days, i would expect a lot of devices are incorporating these features May 15 06:40:16 i am not passionate about reverse engineering, though i love to enable those who are ;) May 15 06:40:37 I've mostly disassembled the firmware with IDA. May 15 06:40:55 And actually ran into a backdoor user, that's enabled via telnet, with a password generated from the mac-address. May 15 06:42:12 sweet :) May 15 06:42:14 not surprising May 15 06:42:25 * zwelch coughs and looks away quickly May 15 06:42:37 Wah? May 15 06:42:44 i would never build such a thing into any products that i worked on May 15 06:42:46 * zwelch coughs and looks away quickly again May 15 06:42:48 ;) May 15 06:43:07 Well, a backdoor user is understandable, but enabled via telnet is not so good. May 15 06:43:23 try explaining that to Corporate ;) May 15 06:43:47 :) May 15 06:44:04 I did notice two 'missing' SMD resistors on the PCB next to the MPC8245. May 15 06:44:29 * zwelch wiggles his eyebrows with intrigue May 15 06:44:31 One of them was 'unconnect' to CKSTP_IN. May 15 06:44:53 The other to GND. May 15 06:50:00 Actually, I'm not 100% sure about the pinout. May 15 06:50:26 But it's very near to the CPU on both devices, it's 2x8 and the GND is on the right pin when I check: http://www.etoolsmiths.com/amcc-powerpc-405-jtag-pin-out.html May 15 06:50:40 And openocd and urjtag are both able to see a JTAG chain when wired like this. May 15 06:51:58 I'm just not entirely sure about JTAG. JTAG basically allows you to get and set pins on the chip? So all other functions like poke, detectflash, etc. are actually higher-level functions implemented by toggling pins? May 15 06:59:19 you are making the common confusion between JTAG and its most common purpose: boundary scanning May 15 06:59:30 JTAG allows you to access other functions than just toggling pins May 15 07:00:10 if you have the openocd svn, i just committed a new reference manual with a Technical Primer on JTAG :) May 15 07:00:33 I should get it if I checkout the latest trunk? May 15 07:00:55 run 'doxygen Doxyfile' from the top of your working copy, then fire up doxygen/index.html in a browser and it should be easy to find May 15 07:01:27 i have a patch that will make this a little easier and cleaner May 15 07:01:35 * zwelch can't decide whether to commit it or not May 15 07:01:51 Make the generation cleaner? May 15 07:02:02 Or the manual? May 15 07:02:20 the generation.... if it was the manual, it would be a no brainer :) May 15 07:02:35 What would you patch? Generate it during make? May 15 07:02:42 make docs, yeah May 15 07:03:06 just a simple rule... and tiny perl script to make the output less verbose while still redirecting it to a log May 15 07:03:20 "make docs" sounds like a common thing. May 15 07:03:32 it is, the catch is the perl script :) May 15 07:03:45 What kind of catch? May 15 07:03:47 i _think_ everyone will have perl installed May 15 07:03:51 Ahh, like so. May 15 07:03:53 but i am not sure May 15 07:03:58 Dependency on perl. May 15 07:04:12 And you can't easily implement it with awk or sed? May 15 07:04:15 i don't like adding gratuitous deps, but i think we already have it May 15 07:04:24 basically, autotools uses perl, doesn't it? May 15 07:04:29 automake at any rate May 15 07:04:45 can't remember, but i thought it gets required somehow :) May 15 07:05:09 $ apt-cache show autoconf | grep ^Depends May 15 07:05:09 Depends: perl (>> 5.005), m4 (>= 1.4.8), debianutils (>= 1.8) May 15 07:05:12 anyway, there is at least one perl script already in the tree (tools/rlink_speed_table_mumble/...) May 15 07:05:21 and there you have it :) May 15 07:05:27 so i suppose it's safe May 15 07:05:36 But you only need autoconf when you need to bootstrap. May 15 07:05:52 touche May 15 07:06:22 well, it's part of the developer reference manual May 15 07:06:30 Reimplementing the perl script in sed or awk is non-trivial? May 15 07:06:39 in theory, it should be used in the svn tree May 15 07:07:06 doxygen is rather chatty indeed. May 15 07:07:07 oh, it might not be... but i have to admit that i never mastered those tools as well as I know that I should ;) May 15 07:07:54 it's really trivially: read and echo lines. print a '.' to stderr every N lines, and print a '\n' every C columns May 15 07:08:08 clever, but trivial ;) May 15 07:08:43 thus, 'make docs' does 'doxygen Doxyfile | dotty.pl >doxygen.log' May 15 07:09:15 dunno May 15 07:09:43 I have to say my awk and sed skills are also less than stellar. ;) May 15 07:10:02 my argument might be that it could be an unlisted dep, since this documentation should not be generated during normal builds May 15 07:10:06 it takes too long, for one May 15 07:10:24 developers that want to run make docs May 15 07:10:47 ... should simply have to install perl... possibly at the same time they install doxygen and graphviz :) May 15 07:11:09 Why print . to stderr? May 15 07:11:24 because it does >doxygen.log May 15 07:11:35 Oh, the '.' output is for the user? May 15 07:11:42 it echos through, but that gets hidden... yup it shows progress May 15 07:11:56 on my machine, the process takes ~15 second even when nothing has changed May 15 07:12:12 when doing a fresh build, it takes a long time May 15 07:12:22 that's too long to go without indication of progress May 15 07:12:33 and it's impossible to debug the issues without a log May 15 07:12:42 so, the script is the best of both worlds... May 15 07:12:45 now, what i wonder: May 15 07:13:18 there has _got_ to be a tiny tool in a GNU package that provides this, and it's probably installed on my system May 15 07:13:21 what is it called? :) May 15 07:14:00 i've written a script like this several different times for different projects, and i can't be the only one May 15 07:14:50 You'd say so, but... :) May 15 07:21:23 cat doxyoutput | sed 's/.*/./' | sed ':a;N;$!ba;s/\n//g' May 15 07:21:45 Hm, not to stderr. May 15 07:21:48 And ugly. ;) May 15 07:22:13 And it only outputs when the pipe is closed. May 15 07:22:30 no uglier than most of the stuff you see in autoconf's output :) May 15 07:23:00 perl's $| = 1 takes care of flushing after each '.', and it can manage pipes pretty well May 15 07:23:13 honestly, i could probably write it as a one liner. :) May 15 07:23:20 it would be sinfully ugly though May 15 07:25:43 I just read the primer. May 15 07:25:54 I guess that explains the shift dr and ir things I read in most examples. ;) May 15 07:29:00 I should do some more reading to try to get the concepts through to my head. ;) May 15 07:35:10 yeah, the primer is just a start based on a single email from Strontium May 15 07:35:47 i think it is a great start, which is why i added it.... but there is a lot of information to grok, particularly when you consider that JTAG ends up being as general purpose as a UART May 15 07:36:03 It would be nice to have a document like this explaining the various concepts. May 15 07:36:16 http://www.engr.udayton.edu/faculty/jloomis/ece446/notes/jtag/jtag1.html May 15 07:36:18 that's what the manual was started for May 15 07:36:48 folks from this community simply need to write their own original material, spinning it for openocd May 15 07:37:04 I found a lot of these low-level documents, but how it relates to the higher-level concepts is not very clear I think. May 15 07:38:22 i tend to agree May 15 07:38:41 there is a missing middle-layer of documentation that ties the two together May 15 07:38:48 Yes. May 15 07:39:11 * zwelch points to the new manual and grunts May 15 07:39:14 Everybody is pasting the same list of 'instruction sample/preload', 'shift ir', etc. but nobody knows why. ;) May 15 07:45:34 i imagine the ieee spec would be informative May 15 07:45:51 i suppose it might even be worth the price May 15 07:47:53 To you? May 15 07:48:33 to someone that wants to become a master May 15 07:48:46 i am not yet certain that person is me, but it might be ;) May 15 07:48:59 I am just a hobbyst. :) May 15 07:49:53 i am between contracts in my career as a professional software engineer :) May 15 07:50:31 Got some nice products on your resume? May 15 07:50:40 not as many as i would like May 15 07:51:10 but arm/linux machine #28 was my proudest, even if it was shortlived May 15 07:52:22 You helped develop this machine? May 15 07:52:54 i was its sole software engineer during its initial development and subsequent launch May 15 07:53:08 What was the goal of it? May 15 07:53:12 tdsway.com May 15 07:53:17 handheld computers May 15 07:53:31 Ah, cool. May 15 07:54:05 indeed. i would love to find a similar job again, given what i have learned in the past decade May 15 07:55:06 then, i got hired because i played mandolin with its electrical engineer; now, i actually have the credentials to do it :) May 15 07:55:24 Business is contacts. :) May 15 07:55:31 nevermind that i was successful at it then, no sane hiring manager would have ever let me in the door May 15 07:55:39 yup May 15 07:58:00 The ranger was used in a few products? May 15 08:13:48 i was an oem handheld, yah May 15 08:14:02 many different markets May 15 08:14:10 however, it was really a wince device May 15 08:14:19 Meh. ;) May 15 08:14:48 my linux port was a side-effort that they tolerated for a while May 15 08:15:01 Was the linux port used in anything? May 15 08:15:20 years after i left then ended up getting a third-party to do a port for a newer product May 15 08:15:45 that port served one important purpose for me: it made me swear off working on windows ce May 15 08:15:56 How so? May 15 08:16:01 i started a linux consulting company after that :) May 15 08:16:20 i have not and will not work on windows May 15 08:16:27 since then :) May 15 08:22:01 One of my goals is to try to see if it's possible for me to boot u-boot and later maybe Linux on the device. ;) May 15 08:22:31 It's currently running a custom bootloader from Accton booting an VxWorks firmware. May 15 08:23:05 And then the next step would be to try to interface with the switching fabric on the PCI bus. ;) May 15 08:23:42 any time frame for these milestones? :) May 15 08:23:46 Heh, no. May 15 08:23:58 then you stand a chance of succeeding :D May 15 08:24:06 Just playing with unused parts. May 15 08:24:21 I'm a network engineer and we've mostly migrated away from these parts. May 15 08:24:37 Mostly due to the buggy software. May 15 08:24:43 hah :) May 15 08:24:57 it'd be neat if you could prove it wasn't the hardware :) May 15 08:25:08 i wonder if you could ask for a refund ;) May 15 08:25:16 Heh, nah. May 15 08:25:37 It's not only buggy, but also cumbersome in use. May 15 08:25:43 Little to no logging. May 15 08:25:52 Little to no diagnostic features. May 15 08:27:02 I know some vendors selling switches based on similar silicon running Linux, but they are very niche and very expensive usually. May 15 08:27:25 And often the linux is just a shim around the large binary blob that does all the real work. May 15 08:31:35 well, it sounds like you have your work cut out for you May 15 08:31:45 it would be hard to do worse than what you have :) May 15 08:32:19 And the switches are written off anyhow, so even if I break them, ohh well. ;) May 15 08:32:36 plural... oh, boy... you have room for error :) May 15 08:33:05 Yeah. :) May 15 08:33:26 Now to figure out if I can communicate with the two Intel Strataflash devices. May 15 08:33:52 Via JTAG to the MPC8245. May 15 08:34:40 should be possible May 15 08:35:16 How could I verify that at least my communication is correct? May 15 08:35:22 depends on their configuration though; there has been recent discussion in this area on the openocd list May 15 08:35:28 I see an IR chain, a device, etc. May 15 08:35:29 well, can you id scan them? May 15 08:35:35 that's a good start May 15 08:35:44 Yes, but the IDCODE is 0x0. But that's apparently normal for MPC824x. May 15 08:35:45 from there.... it's black magic May 15 08:35:57 fun May 15 08:36:21 http://buffalo.nas-central.org/wiki/JTAG_Software/Openwince#Flash_Programming May 15 08:36:37 btw... "black magic" means i can't deconstruct the process to the point where i can eplain it :) May 15 08:36:50 That's a completely different device, but the same CPU and the same output for 'detect'. May 15 08:37:07 Heh. May 15 08:37:14 Concepts. ;) May 15 08:37:28 they can be contagious. :) May 15 08:38:39 But since my communication appears in order, the two missing SMDs are probably not directly related? May 15 08:38:52 The PCB is filled with missing components. May 15 08:40:22 probably not related May 15 08:40:36 but without a schematic, who knows May 15 08:40:46 Unlikely I'll be getting one soon. ;) May 15 08:41:48 I tried tracing the lines on the PCB, but the PCB appears multilayer. May 15 08:46:22 zwelch: I was indeed speaking of openocd May 15 08:47:05 I've joined the mailing list and will post a report there to see if anyone can help. The problem seems to be a refusal to go into state 'halted' on 'reset halt' with the amontec May 15 08:51:57 cool. thanks for joining and i will look forward to your post May 15 08:52:18 wookey_: there's a lot of change going on in the community right now May 15 08:53:33 fwiw, i am having similar problems with my target, but i am not thinking they are related... just that there are lot of minor bugs to shake free from the tree May 15 10:58:43 <_julian> hi all May 15 12:42:15 <_julian> I am new to openocd and am just trying to get a JTAG connection with a embedded-projects JTAG board and a LPC2144 uc. before I used a rowley adapter with the rowley sutdio, that worked well. now I wanted to start of making a lpc2144 config, I used the lpc2148.cfg and changed the flash size to 0x1f400 (128k), but this gives me the error: May 15 12:42:18 <_julian> Error: BUG: unknown bank->size encountered May 15 12:42:22 <_julian> any ideas on this? May 15 13:49:12 128k is 128*1024 = 131072 = 0x20000 May 15 16:48:19 <_julian_> mlundin: ok, 0x20000 is accepted. actually the size for the lpc2138 was set to 512*1000, that's why did 128*1000, as well May 15 16:48:27 <_julian_> anyway I do get: Error: RCLK not supported May 15 16:48:27 <_julian_> Error: JTAG communication failure, check connection, JTAG interface, target power etc. May 15 16:48:58 <_julian_> the same board works with rowley+crossconnect+adapter cable to the boards connector May 15 16:49:45 Ok... pin 15 on the Olimex is RST... is this the "SRST" pin? if so, can I connect that to the RST pin on the target? I am having a bitch of a time with this ADuC, reset init says "SRST can not be asserted." but when I connect up the RST line OpenOCD whines about IR mismatch. It is very frustrating May 15 16:50:13 I also have a pull up on RST. I can post a schematic if anyone would like. May 15 16:51:03 this is killing me: Error: Could not validate JTAG scan chain, IR mismatch, scan returned 0x3f. tap=aduc7026.cpu pos=0 expected 0x1 got 3 May 15 16:51:42 <_julian_> Chocobo: have the same error... still, I get the error I posted even before May 15 16:55:44 are you trying, or your cfg file, to set jtag_khz 0 ? May 15 16:55:45 ugh... no work around? I have tried about every combination of reset_config. I am using OpenOCD 0.1.0 May 15 16:56:10 I have been messing around with jtag_speed. let me trie jtag_khz May 15 16:56:52 I just get an additional error: Error: RCLK not supported May 15 16:57:43 jtag_khz 1 removes that error.... but the others are still there. May 15 16:57:50 I meant, that is the cause of this error message, sorry for confusion May 15 16:59:22 Oh... nope. Here is my config file and the error output: http://pastebin.com/m63502fd6 May 15 17:02:05 there is a communications failure, so all data are wrong. Try to run openocd with the -d3 flag to get more debug output May 15 17:05:19 Not much new information: http://pastebin.com/m3ee72dd2 The interesting thing is... if I disconnect the RST line it works .... better. Not great, the reset command is all screwed up but at least it finds the device. May 15 17:06:56 ooooooh interesting. I cut the RST line and it is still doing it. May 15 17:23:19 ugh, I just don't know. May 15 18:22:41 when issuing a "reset halt" you would expect the PC to be 0x00000000 correct? May 15 18:24:59 I have managed to get it so this is the worst offender: srst pulls trst - can not reset into halted mode. Issuing halt after reset. May 15 19:08:00 this is old discussion, some processors cannot be be reset to halt, security feature to hide rom contents. Boot code must initialize debug access. May 15 19:09:30 for my lpc2148 reset halts stops at 0x00000378 **** ENDING LOGGING AT Sat May 16 02:59:57 2009