]> git.sur5r.net Git - openocd/blobdiff - src/jtag/jtag.c
- removed obsolete cmd JLINK_TAP_SEQUENCE_COMMAND, use EMU_CMD_HW_JTAG instead
[openocd] / src / jtag / jtag.c
index 1e0e889bff808b3a7d697f27facecec227e93f21..cd4b255a90ae07ab6e95262a3bbaa098223a3c56 100644 (file)
@@ -937,7 +937,8 @@ void jtag_add_reset(int req_tlr_or_trst, int req_srst)
                                ((req_srst&&!jtag_srst)||
                                                (!req_srst&&jtag_srst)))
                {
-                       LOG_ERROR("BUG: transition of req_tlr_or_trst and req_srst in the same jtag_add_reset() call is undefined");
+                       // FIX!!! srst_pulls_trst allows 1,1 => 0,0 transition....
+                       //LOG_ERROR("BUG: transition of req_tlr_or_trst and req_srst in the same jtag_add_reset() call is undefined");
                }
        }
        
@@ -1259,7 +1260,13 @@ enum scan_type jtag_scan_type(scan_command_t *cmd)
 int MINIDRIVER(interface_jtag_execute_queue)(void)
 {
        int retval;
-
+       
+       if (jtag==NULL)
+       {
+               LOG_ERROR("No JTAG interface configured yet. Issue 'init' command in startup scripts before communicating with targets.");
+               return ERROR_FAIL;
+       }
+       
        retval = jtag->execute_queue();
        
        cmd_queue_free();
@@ -1592,7 +1599,8 @@ int jtag_init_reset(struct command_context_s *cmd_ctx)
        if (jtag_reset_config & RESET_HAS_SRST)
        {
                jtag_add_reset(1, 1);
-               jtag_add_reset(0, 1);
+               if ((jtag_reset_config & RESET_SRST_PULLS_TRST)==0)
+                       jtag_add_reset(0, 1);
        }
        jtag_add_reset(0, 0);
        if ((retval = jtag_execute_queue()) != ERROR_OK)