esirisc: support eSi-Trace
This patch adds support for instruction tracing to eSi-RISC targets. The command interface is borrowed heavily from ETM; eSi-Trace uses a less sophisticated model for tracing, however the setup and usage is similar. This patch also cleans up the command interfaces of the other esirisc command groups and adds additional debugging information to log messages when dealing with CSRs. This patch "finalizes" support for 32-bit eSi-RISC targets. Change-Id: Ia2a9de79a3c7c066240b5212721fb1b7584a9a45 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/4780 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Matthias Welwarsky
parent
7ae6b04b98
commit
c5eb990825
@@ -20,12 +20,14 @@
|
||||
#ifndef OPENOCD_TARGET_ESIRISC_H
|
||||
#define OPENOCD_TARGET_ESIRISC_H
|
||||
|
||||
#include <helper/types.h>
|
||||
#include <target/breakpoints.h>
|
||||
#include <target/register.h>
|
||||
#include <target/target.h>
|
||||
|
||||
#include "esirisc_jtag.h"
|
||||
#include "esirisc_regs.h"
|
||||
#include "esirisc_trace.h"
|
||||
|
||||
#define MAX_BREAKPOINTS 8
|
||||
#define MAX_WATCHPOINTS 8
|
||||
@@ -88,11 +90,15 @@ struct esirisc_common {
|
||||
int num_regs;
|
||||
bool has_icache;
|
||||
bool has_dcache;
|
||||
int num_breakpoints;
|
||||
int num_watchpoints;
|
||||
bool has_trace;
|
||||
|
||||
int num_breakpoints;
|
||||
struct breakpoint *breakpoints_p[MAX_BREAKPOINTS];
|
||||
|
||||
int num_watchpoints;
|
||||
struct watchpoint *watchpoints_p[MAX_WATCHPOINTS];
|
||||
|
||||
struct esirisc_trace trace_info;
|
||||
};
|
||||
|
||||
union esirisc_memory {
|
||||
@@ -116,7 +122,7 @@ static inline struct esirisc_common *target_to_esirisc(struct target *target)
|
||||
return (struct esirisc_common *)target->arch_info;
|
||||
}
|
||||
|
||||
static inline char *esirisc_cache_arch(struct esirisc_common *esirisc)
|
||||
static inline char *esirisc_cache_arch_name(struct esirisc_common *esirisc)
|
||||
{
|
||||
return esirisc->cache_arch == ESIRISC_CACHE_HARVARD ? "harvard" : "von_neumann";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user