chain position is now required when creating a target
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 28 Jan 2009 13:08:06 +0000 (13:08 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 28 Jan 2009 13:08:06 +0000 (13:08 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1363 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/Makefile.am
src/target/target.c
src/target/test/syntax1.cfg [new file with mode: 0644]

index cf6982d499b88b85abce93c0ea08f219a4b3bbbc..a9c054d20cdfc8bae6dc9176d94734b0725cf163 100644 (file)
@@ -29,4 +29,7 @@ nobase_dist_pkglib_DATA += $(wildcard $(srcdir)/interface/*.cfg)
 # Various preconfigured boards
 nobase_dist_pkglib_DATA += $(wildcard $(srcdir)/board/*.cfg)
 
+# test files
+nobase_dist_pkglib_DATA += $(wildcard $(srcdir)/test/*.cfg)
+
 MAINTAINERCLEANFILES = Makefile.in
index bafd98e9dec033025c957aba8f4e931b7116295a..cc1d48a889b884000b43243c909dbc39cd0f6e4c 100644 (file)
@@ -3341,6 +3341,8 @@ static int target_configure( Jim_GetOptInfo *goi, target_t *target )
                        break;
                }
        } /* while( goi->argc ) */
+
+
                /* done - we return */
        return JIM_OK;
 }
@@ -3839,6 +3841,13 @@ static int target_create( Jim_GetOptInfo *goi )
        /* Do the rest as "configure" options */
        goi->isconfigure = 1;
        e = target_configure( goi, target);
+
+       if (target->tap == NULL)
+       {
+               Jim_SetResultString( interp, "-chain-position required when creating target", -1);
+               e=JIM_ERR;
+       }
+
        if( e != JIM_OK ){
                free( target->type );
                free( target );
diff --git a/src/target/test/syntax1.cfg b/src/target/test/syntax1.cfg
new file mode 100644 (file)
index 0000000..c312f60
--- /dev/null
@@ -0,0 +1,29 @@
+jtag_nsrst_delay 200\r
+jtag_ntrst_delay 200\r
+\r
+#use combined on interfaces or targets that can't set TRST/SRST separately\r
+reset_config trst_and_srst srst_pulls_trst\r
+\r
+#LPCs need reset pulled while RTCK is low. 0 to activate JTAG, power-on reset is not enough\r
+jtag_reset 1 1\r
+jtag_reset 0 0\r
+\r
+#jtag scan chain\r
+#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)\r
+jtag newtap lpc2148 one -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x4f1f0f0f\r
+\r
+#target configuration\r
+#daemon_startup reset\r
+\r
+set _TARGETNAME [format "%s.cpu" lpc2148]\r
+target create lpc2148.cpu arm7tdmi -endian little -work-area-size 0x4000 -work-area-phys 0x40000000 -work-area-virt 0 -work-area-backup 0\r
+\r
+$_TARGETNAME configure -event reset-init { \r
+soft_reset_halt \r
+mvb 0xE01FC040 0x01 \r
+}\r
+\r
+\r
+\r
+flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 14765\r
+\r

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)