arm11 wip
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 14 Jan 2009 15:25:45 +0000 (15:25 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 14 Jan 2009 15:25:45 +0000 (15:25 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1317 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c
src/target/target/imx31.cfg

index 80707b15b28832a013c3135de623e43d4c2aa542..bbf90e042ac3613ab8b197864c0c7bfdb2dba169 100644 (file)
@@ -40,6 +40,7 @@
 */
 int jtag_error=ERROR_OK;
 
+
 typedef struct cmd_queue_page_s
 {
        void *address;
@@ -1364,6 +1365,11 @@ int jtag_read_buffer(u8 *buffer, scan_command_t *cmd)
        return retval;
 }
 
+static const char *jtag_tap_name(jtag_tap_t *tap)
+{
+       return (tap == NULL) ? "(unknown)" : tap->dotted_name;
+}
+
 int jtag_check_value(u8 *captured, void *priv, scan_field_t *field)
 {
        int retval = ERROR_OK;
@@ -1382,7 +1388,7 @@ int jtag_check_value(u8 *captured, void *priv, scan_field_t *field)
                 * acknowledged the error
                 */
                LOG_WARNING("TAP %s:",
-                                       (field->tap == NULL) ? "(unknown)" : field->tap->dotted_name );
+                                       jtag_tap_name(field->tap));
                if (compare_failed)
                {
                        char *captured_char = buf_to_str(captured, (num_bits > 64) ? 64 : num_bits, 16);
@@ -1698,17 +1704,18 @@ int jtag_validate_chain(void)
 
        tap = NULL;
        chain_pos = 0;
+       int val;
        for(;;){
                tap = jtag_NextEnabledTap(tap);
                if( tap == NULL ){
                        break;
                }
 
-
-               if (buf_get_u32(ir_test, chain_pos, 2) != 0x1)
+               val = buf_get_u32(ir_test, chain_pos, 2);
+               if (val != 0x1)
                {
                        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);
+                       LOG_ERROR("Could not validate JTAG scan chain, IR mismatch, scan returned 0x%s. tap=%s pos=%d expected 0x1 got %0x", cbuf, jtag_tap_name(tap), chain_pos, val);
                        free(cbuf);
                        free(ir_test);
                        return ERROR_JTAG_INIT_FAILED;
@@ -1716,10 +1723,11 @@ int jtag_validate_chain(void)
                chain_pos += tap->ir_length;
        }
 
-       if (buf_get_u32(ir_test, chain_pos, 2) != 0x3)
+       val = buf_get_u32(ir_test, chain_pos, 2);
+       if (val != 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);
+               LOG_ERROR("Could not validate end of JTAG scan chain, IR mismatch, scan returned 0x%s. pos=%d expected 0x3 got %0x", cbuf, chain_pos, val);
                free(cbuf);
                free(ir_test);
                return ERROR_JTAG_INIT_FAILED;
@@ -2249,7 +2257,7 @@ static int jtag_init_inner(struct command_context_s *cmd_ctx)
 
        if (jtag_validate_chain() != ERROR_OK)
        {
-               LOG_ERROR("Could not validate JTAG chain, continuing anyway...");
+               LOG_WARNING("Could not validate JTAG chain, continuing anyway...");
        }
 
        return ERROR_OK;
@@ -2953,6 +2961,7 @@ void jtag_tap_handle_event( jtag_tap_t * tap, enum jtag_tap_event e)
        }
 }
 
+
 /* map state number to SVF state string */
 const char* jtag_state_name(enum tap_state state)
 {
@@ -2981,3 +2990,4 @@ const char* jtag_state_name(enum tap_state state)
 
        return ret;
 }
+
index 3d4883b753ea0ec72b3cfbc89b89c2207a8f25be..3fed2f820316cc2215d7a975a057a92238708670 100644 (file)
@@ -45,14 +45,14 @@ jtag newtap $_CHIPNAME sjc -irlen 4 -ircapture 0x0 -irmask 0x0 -expected-id $_SJ
 #    SDMA_BYPASS - disables SDMA    - 
 #  
 # Per ARM: DDI0211J_arm1136_r1p5_trm.pdf - the ARM 1136 as a 5 bit IR register
-jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID
 
 # No IDCODE for this TAP
 jtag newtap $_CHIPNAME whatchacallit -irlen 4 -ircapture 0 -irmask 0xf -expected-id 0x0
 
 # Per section 40.17.1, table 40-85 the IR register is 4 bits
 # But this conflicts with Diagram 6-13, "3bits ir and drs"
-jtag newtap $_CHIPNAME smda -irlen 5 -ircapture 0x1 -irmask 0xf -expected-id $_SDMATAPID
+jtag newtap $_CHIPNAME smda -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_SDMATAPID
 
 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
 target create $_TARGETNAME arm11 -endian $_ENDIAN -chain-position $_TARGETNAME

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)