if (trst_with_tlr) {
LOG_DEBUG("JTAG reset with TLR instead of TRST");
jtag_add_tlr();
+ jtag_execute_queue();
} else if (jtag_trst != new_trst) {
jtag_trst = new_trst;
/* Add room for end-of-chain marker. */
max_taps++;
- uint8_t *idcode_buffer = malloc(max_taps * 4);
+ uint8_t *idcode_buffer = calloc(4, max_taps);
if (idcode_buffer == NULL)
return ERROR_JTAG_INIT_FAILED;
return ERROR_OK;
if (!adapter_driver) {
- /* nothing was previously specified by "interface" command */
+ /* nothing was previously specified by "adapter driver" command */
LOG_ERROR("Debug Adapter has to be specified, "
- "see \"interface\" command");
+ "see \"adapter driver\" command");
return ERROR_JTAG_INVALID_INTERFACE;
}
if (CLOCK_MODE_UNSELECTED == clock_mode) {
LOG_ERROR("An adapter speed is not selected in the init script."
- " Insert a call to adapter_khz or jtag_rclk to proceed.");
+ " Insert a call to \"adapter speed\" or \"jtag_rclk\" to proceed.");
return ERROR_JTAG_INIT_FAILED;
}
/* adapters without trst signal will eventually use tlr sequence */
jtag_add_reset(trst, srst);
return ERROR_OK;
- } else if (transport_is_swd() || transport_is_hla()) {
+ } else if (transport_is_swd() || transport_is_hla() ||
+ transport_is_dapdirect_swd() || transport_is_dapdirect_jtag()) {
if (trst == TRST_ASSERT) {
LOG_ERROR("transport %s has no trst signal",
get_current_transport()->name);
else
jtag_add_reset(0, 1);
return ERROR_OK;
- } else if (transport_is_swd() || transport_is_hla())
+ } else if (transport_is_swd() || transport_is_hla() ||
+ transport_is_dapdirect_jtag() || transport_is_dapdirect_swd())
return adapter_system_reset(1);
else if (get_current_transport() != NULL)
LOG_ERROR("reset is not supported on %s",
if (transport_is_jtag()) {
jtag_add_reset(0, 0);
return ERROR_OK;
- } else if (transport_is_swd() || transport_is_hla())
+ } else if (transport_is_swd() || transport_is_hla() ||
+ transport_is_dapdirect_jtag() || transport_is_dapdirect_swd())
return adapter_system_reset(0);
else if (get_current_transport() != NULL)
LOG_ERROR("reset is not supported on %s",