cheap jtag cable for PowerPC embedded - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: August 06, 2019, 10:30:21 am
content: The last Friday the weather was so terrible that we had to stay indoors, so I played with an old board that I happened to "brick" (1) years ago when I uploaded a corrupted image. Old Uboot versions were rather crappy software very hard to be compiled in the right way, so it's very easy that you compile something and you get ... garbage, but you will only aware of it once you have already uploaded into the board's flash.You upload, you issue the "reset" command, the board reboots, and ... oh-oh, you don't see anything on the serial console, so ... Houston, we have a problem, the board is now brickedHow to resume this?if you have the money, you can buy a serious Jtag cable, able to reprogram the flash with the right firmware. Tools like the old BDI2000 or BDI3000 are now EOL, and you can find on eBay for cheap (200 Euro), the only problem is that you need specific support for your CPU, which in my case is PowerPC405GP made by IBM rather than by AMCC (both are 405GP, but the support is different).if you are "crazy" enough, you can desolder the flash, wire pins to a DIP socket, and then use a ROM-emulator.step1: find a cheap jtag cableIn my case, the ROM is a 512Kbyte parallel chip at 3.3V, so the ROM-emulator trick would have worked, but I preferred googling a bit, and I found an old post made by someone who said in the far 2001 that there was a freeware tool able to rule a cheap jtag cable made with a couple of TTL chips and some resistances. The name of this cable is "Wiggler", and the name of the magic software is "OCD commander", but ... there are things you must know: as every company in the business when a good engineer makes a good product ... those in manager-group absolutely have to waste it!step2: find the software to drive the cheap jtag cableSo the lastOCD commanderis v2.4.5, it's somehow available for download, but once installed you find that it has the support for IBM 40x completely removed without a line that informs you about this, perhaps because it's a demo version and they don't have to tell you. Here is where I started to play hard at finding the old2.2.4version that has the support, and I was lucky enough to find it in remote FTP.Version 2.2.4 was reported to have the support, and it really has the "IBM405GP" listed in the "supported chip" as well as you can see "Wiggler" listed in the "supported cables", but ... here is when I started to fight against the parallel port on which the Wiggler cable is based onThere are a lot of operative modes nowadays for the parallel port: unidirectional (for printers), bi-direction, ECP, EPP, ... OCD doesn't explicitly say anything about the right operative mode for the Wiggler cable (ECP? EPP? what do I have to set?!?), and, just to make things even worse, some computer's do not even support all the operative modes, e.g. my IBM X61s ... As a result, the OCD program does not work properly, and you are not able to halt the CPU, dump registers, it always responds with 0x00. I don't think OCD does a good job at checking the protocol integrity, in fact, you get 0x00 even when you don't connect the jtag cable to the target.step3: find the hardware able to run the software to drive the cheap jtag cableSo, after 2 hours of fighting on my laptop, I decided to try a Pentium4motherboard supported by American Megatrends, whose magic BIOS supports everything related to the parallel port! Iset EPP, finally, the software went ahead, but when I tried to issue the "halt" command to stop the CPU, OCD replied with a message that indicates that you have to use it on Windows NT or Windows 2000step4: find the right OS able to run hardware able to run the software to drive the cheap jtag cableSo,I installed Windows 2000, and this has finally made the Wiggler cable able to operate with my PowerPC405GP, and I am finally able to correctly halt the CPU, dump and set registers, and reprogram the onboard flash.... and all is well all that ends well: job done, my IBM405GP has just been "un-bricked" and resumed to its working statep.s.If someone needs the software, can contact me in private.(1) "to brick a computer board": nerd slang, you upload a corrupted firmware, and you get your board as useful as a brick!

author: legacy
author_rank: Super Contributor
timestamp: August 06, 2019, 04:31:40 pm
content: let me know if you find a better alternative, cheap, and ... if it's possible ... supported by OpenSource on Linux.

author: SiliconWizard
author_rank: Super Contributor
timestamp: August 06, 2019, 04:33:33 pm
content: Don't know... isn't PPC supported by OpenOCD?

author: legacy
author_rank: Super Contributor
timestamp: August 06, 2019, 06:37:54 pm
content: Basically "no"; specifically the IBM405GP is not yet supported. There existed open source implementations of powerpc target manipulation, but there hasn't been a lot of activity in the mailing list.