@@ -121,15 +121,24 @@ Bmp::Bmp(std::string dev,
121121 int c = snprintf (construct, REMOTE_MAX_MSG_SIZE , " %s" , REMOTE_START_STR );
122122 platform_buffer_write (construct, c);
123123 c = platform_buffer_read (construct, REMOTE_MAX_MSG_SIZE );
124-
125124 if ((!c) || (construct[0 ] == REMOTE_RESP_ERR )) {
126125 DEBUG_WARN (" Remote Start failed, error %s\n " ,
127126 c ? (char *)&(construct[1 ]) : " unknown" );
128127 throw std::runtime_error (" remote_init failed" );
129128 }
130129 DEBUG_PROBE (" Remote is %s\n " , &construct[1 ]);
131130
132- /* Get Version to init*/
131+ /* Init JTAG */
132+ c = snprintf ((char *)construct, REMOTE_MAX_MSG_SIZE , " %s" ,
133+ REMOTE_JTAG_INIT_STR );
134+ platform_buffer_write (construct, c);
135+ c = platform_buffer_read (construct, REMOTE_MAX_MSG_SIZE );
136+ if ((!c) || (construct[0 ] == REMOTE_RESP_ERR )) {
137+ DEBUG_WARN (" jtagtap_init failed, error %s\n " ,
138+ c ? (char *)&(construct[1 ]) : " unknown" );
139+ throw std::runtime_error (" jtag_init failed" );
140+ }
141+ /* Get Version*/
133142 int s = snprintf ((char *)construct, REMOTE_MAX_MSG_SIZE , " %s" ,
134143 REMOTE_HL_CHECK_STR );
135144 platform_buffer_write (construct, s);
0 commit comments