Re: [Openocd-development] GDB/Telnet doesn't open when ignoring the IR mismatch code of iMX31 processor
Hi Valentin, 2008/8/20 Valentin Longchamp <[EMAIL PROTECTED]>: > Hi all, > sic > Here is the beginning of the log I get with using the gdbinit script > Alan sent me for i.MX31 > > Open On-Chip Debugger 1.0 (2008-08-19-20:07) svn:946M > $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ > jtag_speed: 10 > Info: JTAG device found: 0x2b900f0f (Manufacturer: 0x787, Part: > 0xb900, Version: 0x2) > Info: JTAG device found: 0x07b3601d (Manufacturer: 0x00e, Part: > 0x7b36, Version: 0x0) > Warning:Device does not have IDCODE > Info: JTAG device found: 0x1190101d (Manufacturer: 0x00e, Part: > 0x1901, Version: 0x1) > Info: found ARM1136 > Warning:no telnet port specified, using default port > Warning:no gdb port specified, using default port > Warning:no tcl port specified, using default port > Info: accepting 'gdb' connection from 0 > Error: Target not examined yet > Warning:acknowledgment received, but no packet pending > Error: Target not examined yet > Error: unexpected error -4 > Runtime error, file "?", line 1: >Unknown command: endian_little > In procedure 'endian' called at file "?", line 1 > In procedure 'unknown' called at file "?", line 1 > Error: JTAG communication failure, check connection, JTAG interface, > target power etc. > Error: trying to validate configured JTAG chain anyway... > Warning:value captured during scan didn't pass the requested check: > captured: 0x00 check_value: 0x01 check_mask: 0x1f > Warning:in_handler reported a failed check > Warning:value captured during scan didn't pass the requested check: > captured: 0x00 check_value: 0x01 check_mask: 0x1f > Warning:in_handler reported a failed check > Error: 'arm11 target' JTAG communication error SCREG SCAN OUT 0x00 > (expected 0x10) > Warning:in_handler reported a failed check > Warning:value captured during scan didn't pass the requested check: > captured: 0x00 check_value: 0x01 check_mask: 0x1f > Warning:in_handler reported a failed check > Error: 'target arm11' expects IDCODE 0x*7B*7 > Runtime error, file "?", line 1: > > register idcode not found in current target > register control not found in current target > register pport_memory_remap not found in current target > Runtime error, file "?", line 1: >Unknown command: long_0x53FC_=_0x040 > In procedure 'long' called at file "?", line 1 > In procedure 'unknown' called at file "?", line 1 > In procedure 'long_0x53FC' called at file "?", line 1 > In procedure 'unknown' called at file "?", line 1 > In procedure 'long_0x53FC_=' called at file "?", line 1 > In procedure 'unknown' called at file "?", line 1 > Runtime error, file "?", line 1: >Unknown command: long_0x53F8_=_0x074B0B7D > In procedure 'long' called at file "?", line 1 > In procedure 'unknown' called at file "?", line 1 > In procedure 'long_0x53F8' called at file "?", line 1 > In procedure 'unknown' called at file "?", line 1 > In procedure 'long_0x53F8_=' called at file "?", line 1 > In procedure 'unknown' called at file "?", line 1 > Runtime error, file "?", line 1: > > Alan: has this script worked for you with openocd ? You had asked me a > while ago, but I only have had time to test it yesterday evening. I am using this gdbinit with Segger J-Link GDB and with Macraigor USB2Demon, then we will need some modifications to it work: Remove the registers: register idcode, control, pport_memory_remap; they are not really necessary to board initialization. I will re-test it soon using the Oyvind suggestions. > > Regards > > Valentin > Best Regards, Alan ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] GDB/Telnet doesn't open when ignoring the IR mismatch code of iMX31 processor
On Wed, Aug 20, 2008 at 9:03 AM, Valentin Longchamp <[EMAIL PROTECTED]> wrote: > Hi all, > > On Tue, Aug 19, 2008 at 3:56 PM, Øyvind Harboe <[EMAIL PROTECTED]> wrote: >> I've committed this patch, even if it is work in progress, as >> there are also other changes to jtag.c going on at this time >> and synchronizing work takes priority. >> > > I have given it a try, I cann connect with gdb, however I have further > error later, telling me that the "target has not been examined yet". > Is this a problem that is going to cause bad behavior with gdb ? Is > this what you mean Oyvind when you say the patch is work in progress ? If the target can not be examined, then basically communication isn't working. It is possible to connect GDB to OpenOCD when the target is powered down. The first test is to connect w/Telnet and to test the following (ordered by difficulty in getting them to work): - reset run - reset halt - examine registers to see that they are sane - reset init - examine & modify memory - halt/resume Once you have the above working, you can think about trying to get GDB to work. > Alan: has this script worked for you with openocd ? You had asked me a > while ago, but I only have had time to test it yesterday evening. > Oyvind: I think there are a lot of other things that need to be fixed > in jtag.c so that the bad i.MX31 jtag chain can be supported (the > target not examined yet error for instance) ? Is it worth doing it now > or should we wait for Duane to have progressed in his changes ? Do not wait for Duane. We'll handle any merging + we pretty much know what his changes are going to be at this point. Submit patches against latest version of trunk. -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 XScale Cortex JTAG debugger and flash programmer ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] GDB/Telnet doesn't open when ignoring the IR mismatch code of iMX31 processor
Hi all, On Tue, Aug 19, 2008 at 3:56 PM, Øyvind Harboe <[EMAIL PROTECTED]> wrote: > I've committed this patch, even if it is work in progress, as > there are also other changes to jtag.c going on at this time > and synchronizing work takes priority. > I have given it a try, I cann connect with gdb, however I have further error later, telling me that the "target has not been examined yet". Is this a problem that is going to cause bad behavior with gdb ? Is this what you mean Oyvind when you say the patch is work in progress ? Here is the beginning of the log I get with using the gdbinit script Alan sent me for i.MX31 Open On-Chip Debugger 1.0 (2008-08-19-20:07) svn:946M $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ jtag_speed: 10 Info: JTAG device found: 0x2b900f0f (Manufacturer: 0x787, Part: 0xb900, Version: 0x2) Info: JTAG device found: 0x07b3601d (Manufacturer: 0x00e, Part: 0x7b36, Version: 0x0) Warning:Device does not have IDCODE Info: JTAG device found: 0x1190101d (Manufacturer: 0x00e, Part: 0x1901, Version: 0x1) Info: found ARM1136 Warning:no telnet port specified, using default port Warning:no gdb port specified, using default port Warning:no tcl port specified, using default port Info: accepting 'gdb' connection from 0 Error: Target not examined yet Warning:acknowledgment received, but no packet pending Error: Target not examined yet Error: unexpected error -4 Runtime error, file "?", line 1: Unknown command: endian_little In procedure 'endian' called at file "?", line 1 In procedure 'unknown' called at file "?", line 1 Error: JTAG communication failure, check connection, JTAG interface, target power etc. Error: trying to validate configured JTAG chain anyway... Warning:value captured during scan didn't pass the requested check: captured: 0x00 check_value: 0x01 check_mask: 0x1f Warning:in_handler reported a failed check Warning:value captured during scan didn't pass the requested check: captured: 0x00 check_value: 0x01 check_mask: 0x1f Warning:in_handler reported a failed check Error: 'arm11 target' JTAG communication error SCREG SCAN OUT 0x00 (expected 0x10) Warning:in_handler reported a failed check Warning:value captured during scan didn't pass the requested check: captured: 0x00 check_value: 0x01 check_mask: 0x1f Warning:in_handler reported a failed check Error: 'target arm11' expects IDCODE 0x*7B*7 Runtime error, file "?", line 1: register idcode not found in current target register control not found in current target register pport_memory_remap not found in current target Runtime error, file "?", line 1: Unknown command: long_0x53FC_=_0x040 In procedure 'long' called at file "?", line 1 In procedure 'unknown' called at file "?", line 1 In procedure 'long_0x53FC' called at file "?", line 1 In procedure 'unknown' called at file "?", line 1 In procedure 'long_0x53FC_=' called at file "?", line 1 In procedure 'unknown' called at file "?", line 1 Runtime error, file "?", line 1: Unknown command: long_0x53F8_=_0x074B0B7D In procedure 'long' called at file "?", line 1 In procedure 'unknown' called at file "?", line 1 In procedure 'long_0x53F8' called at file "?", line 1 In procedure 'unknown' called at file "?", line 1 In procedure 'long_0x53F8_=' called at file "?", line 1 In procedure 'unknown' called at file "?", line 1 Runtime error, file "?", line 1: Alan: has this script worked for you with openocd ? You had asked me a while ago, but I only have had time to test it yesterday evening. Oyvind: I think there are a lot of other things that need to be fixed in jtag.c so that the bad i.MX31 jtag chain can be supported (the target not examined yet error for instance) ? Is it worth doing it now or should we wait for Duane to have progressed in his changes ? Regards Valentin ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] GDB/Telnet doesn't open when ignoring the IR mismatch code of iMX31 processor
I've committed this patch, even if it is work in progress, as there are also other changes to jtag.c going on at this time and synchronizing work takes priority. -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 XScale Cortex JTAG debugger and flash programmer ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
Re: [Openocd-development] GDB/Telnet doesn't open when ignoring the IR mismatch code of iMX31 processor
I've committed some fixes to ARM11 error handling + target/imx31.cfg file. I don't understand precisely what is being suggested by Dominic & Laurent that should be done to jtag_validate_chain(). I'll be happy to take a patch for a spin I've got an iMX31 in my office. I did try to fix jtag_examine_chain() according to the descriptions in the discussion, see attached patch. Any comments? > reset JTAG device found: 0x2b900f0f (Manufacturer: 0x787, Part: 0xb900, Version: 0x2) JTAG device found: 0x07b3601d (Manufacturer: 0x00e, Part: 0x7b36, Version: 0x0) Device does not have IDCODE JTAG device found: 0x2190101d (Manufacturer: 0x00e, Part: 0x1901, Version: 0x2) Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011 Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011 Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011 Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011 Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011 Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011 Could not validate JTAG chain -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 XScale Cortex JTAG debugger and flash programmer Index: C:/workspace/openocd/src/jtag/jtag.c === --- C:/workspace/openocd/src/jtag/jtag.c(revision 929) +++ C:/workspace/openocd/src/jtag/jtag.c(working copy) @@ -1364,9 +1364,8 @@ if ((idcode & 1) == 0) { /* LSB must not be 0, this indicates a device in bypass */ - device_count++; - - LOG_WARNING("Device was in bypass after TRST/TMS reset"); + LOG_WARNING("Device does not have IDCODE"); + idcode=0; bit_count += 1; } @@ -1403,13 +1402,6 @@ break; } - if (device) - { - device->idcode = idcode; - device = device->next; - } - device_count++; - manufacturer = (idcode & 0xffe) >> 1; part = (idcode & 0x000) >> 12; version = (idcode & 0xf000) >> 28; @@ -1419,6 +1411,12 @@ bit_count += 32; } + if (device) + { + device->idcode = idcode; + device = device->next; + } + device_count++; } /* see if number of discovered devices matches configuration */ ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] GDB/Telnet doesn't open when ignoring the IR mismatch code of iMX31 processor
Hi guys, I implemented the Dominic suggestion to ignore the iMX31 IR error: http://forum.sparkfun.com/viewtopic.php?t=7841&postdays=0&postorder=asc&start=45&sid=45354d14976fd68c1fa088693f66ed7f I commented the lines 1475, 1476, 1487 and 1488 of src/jtag/jtag.c: free(cbuf); //free(ir_test); //return ERROR_JTAG_INIT_FAILED; } chain_pos += device->ir_length; device = device->next; } if (buf_get_u32(ir_test, chain_pos, 2) != 0x3) { char *cbuf = buf_to_str(ir_test, total_ir_length, 16); LOG_ERROR("Error validating JTAG scan chain, IR mismatch, scan returned 0x%s", cbuf); free(cbuf); //free(ir_test); //return ERROR_JTAG_INIT_FAILED; } OpenOCD detected iMX31 processor, but it doesn't opened the telnet neither gdb port. This is the openocd output: # openocd -f test.cfg Open On-Chip Debugger 1.0 (2008-08-16-18:28) svn:922 $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $ jtag_speed: 10 Info: J-Link ARM V6 compiled Jul 10 2008 18:11:14 Info: Vref = 1.883 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 1 TRST = 1 Info: J-Link JTAG Interface ready Info: JTAG device found: 0x2b900f0f (Manufacturer: 0x787, Part: 0xb900, Version: 0x2) Info: JTAG device found: 0x07b3601d (Manufacturer: 0x00e, Part: 0x7b36, Version: 0x0) Warning:Device was in bypass after TRST/TMS reset Info: JTAG device found: 0x2190101d (Manufacturer: 0x00e, Part: 0x1901, Version: 0x2) Error: Error validating JTAG scan chain, IR mismatch, scan returned 0x0c2011 Info: found ARM1136 Can someone please give me some suggestion about how to solve this problem? Best Regards, Alan ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development