ARM: dap info fix + tweaks
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 2 Jan 2010 23:53:18 +0000 (15:53 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 2 Jan 2010 23:53:18 +0000 (15:53 -0800)
Fix: don't print the BASE address except if it's a MEM-AP;
that's an unlikely error, but there's no point getting it wrong.
Tweaks: comments, capitalization.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/target/arm_adi_v5.c

index 19154ce6aa47ded5bab6fe26bc5103f4548acc8b..72a07cd63e98e7efdde9e5f5c816e787ecf24b35 100644 (file)
@@ -1075,7 +1075,7 @@ is_dap_cid_ok(uint32_t cid3, uint32_t cid2, uint32_t cid1, uint32_t cid0)
 int dap_info_command(struct command_context *cmd_ctx, struct swjdp_common *swjdp, int apsel)
 {
 
-       uint32_t dbgbase,apid;
+       uint32_t dbgbase, apid;
        int romtable_present = 0;
        uint8_t mem_ap;
        uint32_t apselold;
@@ -1087,25 +1087,31 @@ int dap_info_command(struct command_context *cmd_ctx, struct swjdp_common *swjdp
        swjdp_transaction_endcheck(swjdp);
        /* Now we read ROM table ID registers, ref. ARM IHI 0029B sec  */
        mem_ap = ((apid&0x10000) && ((apid&0x0F) != 0));
-       command_print(cmd_ctx, "ap identification register 0x%8.8" PRIx32 "", apid);
+       command_print(cmd_ctx, "AP ID register 0x%8.8" PRIx32, apid);
        if (apid)
        {
                switch (apid&0x0F)
                {
                        case 0:
-                               command_print(cmd_ctx, "\tType is jtag-ap");
+                               command_print(cmd_ctx, "\tType is JTAG-AP");
                                break;
                        case 1:
-                               command_print(cmd_ctx, "\tType is mem-ap AHB");
+                               command_print(cmd_ctx, "\tType is MEM-AP AHB");
                                break;
                        case 2:
-                               command_print(cmd_ctx, "\tType is mem-ap APB");
+                               command_print(cmd_ctx, "\tType is MEM-AP APB");
                                break;
                        default:
-                               command_print(cmd_ctx, "\tUnknown AP-type");
-                       break;
+                               command_print(cmd_ctx, "\tUnknown AP type");
+                               break;
                }
-               command_print(cmd_ctx, "ap debugbase 0x%8.8" PRIx32 "", dbgbase);
+
+               /* NOTE: a MEM-AP may have a single CoreSight component that's
+                * not a ROM table ... or have no such components at all.
+                */
+               if (mem_ap)
+                       command_print(cmd_ctx, "AP BASE 0x%8.8" PRIx32,
+                                       dbgbase);
        }
        else
        {

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)