X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftarget%2Farm_adi_v5.c;h=65d29f0c2dc121444adea4ba6ab1500667608957;hb=4dd8f8aa40098114d98c369933e2715b207be735;hp=1ef7c1a004aa6e202befe704984a27459ca08cda;hpb=e2073cc18ae1380a7f6d0f61f49aab42de01b732;p=fw%2Fopenocd diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 1ef7c1a00..65d29f0c2 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -69,6 +69,7 @@ #include "config.h" #endif +#include "jtag/interface.h" #include "arm.h" #include "arm_adi_v5.h" #include @@ -977,10 +978,7 @@ int dap_syssec_kinetis_mdmap(struct adiv5_dap *dap) /* we need to assert reset */ if (jtag_reset_config & RESET_HAS_SRST) { /* default to asserting srst */ - if (jtag_reset_config & RESET_SRST_PULLS_TRST) - jtag_add_reset(1, 1); - else - jtag_add_reset(0, 1); + adapter_assert_reset(); } else { LOG_DEBUG("SRST not configured"); dap_ap_select(dap, 0); @@ -1098,14 +1096,6 @@ int ahbap_debugport_init(struct adiv5_dap *dap) LOG_DEBUG(" "); - /* test for initialized low level jtag hardware - * this always fails for stlink hardware - */ - if (!dap->jtag_info) { - LOG_DEBUG("No low level jtag hardware found"); - return ERROR_OK; - } - /* JTAG-DP or SWJ-DP, in JTAG mode * ... for SWD mode this is patched as part * of link switchover @@ -1275,6 +1265,8 @@ int dap_lookup_cs_component(struct adiv5_dap *dap, int ap, retval = mem_ap_read_atomic_u32(dap, (component_base & 0xfffff000) | 0xfcc, &devtype); + if (retval != ERROR_OK) + return retval; if ((devtype & 0xff) == type) { *addr = component_base; retval = ERROR_OK; @@ -1594,6 +1586,10 @@ static int dap_info_command(struct command_context *cmd_ctx, type = "Cortex-M3 FBP"; full = "(Flash Patch and Breakpoint)"; break; + case 0x00c: + type = "Cortex-M4 SCS"; + full = "(System Control Space)"; + break; case 0x00d: type = "CoreSight ETM11"; full = "(Embedded Trace)"; @@ -1643,10 +1639,18 @@ static int dap_info_command(struct command_context *cmd_ctx, type = "Cortex-M3 ETM"; full = "(Embedded Trace)"; break; + case 0x925: + type = "Cortex-M4 ETM"; + full = "(Embedded Trace)"; + break; case 0x930: type = "Cortex-R4 ETM"; full = "(Embedded Trace)"; break; + case 0x9a1: + type = "Cortex-M4 TPUI"; + full = "(Trace Port Interface Unit)"; + break; case 0xc08: type = "Cortex-A8 Debug"; full = "(Debug Unit)";