projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extra Coresight component ROM identifiers for the Cortex-M4
[fw/openocd]
/
src
/
target
/
arm_adi_v5.c
diff --git
a/src/target/arm_adi_v5.c
b/src/target/arm_adi_v5.c
index 1ef7c1a004aa6e202befe704984a27459ca08cda..65d29f0c2dc121444adea4ba6ab1500667608957 100644
(file)
--- a/
src/target/arm_adi_v5.c
+++ b/
src/target/arm_adi_v5.c
@@
-69,6
+69,7
@@
#include "config.h"
#endif
#include "config.h"
#endif
+#include "jtag/interface.h"
#include "arm.h"
#include "arm_adi_v5.h"
#include <helper/time_support.h>
#include "arm.h"
#include "arm_adi_v5.h"
#include <helper/time_support.h>
@@
-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 */
/* 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);
} 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(" ");
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
/* 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);
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;
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;
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)";
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;
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 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)";
case 0xc08:
type = "Cortex-A8 Debug";
full = "(Debug Unit)";