OpenOCD
esp32_sysview.c File Reference
Include dependency graph for esp32_sysview.c:

Go to the source code of this file.

Data Structures

struct  esp_sysview_target2host_hdr
 

Macros

#define ESP32_SYSVIEW_USER_BLOCK_CORE(_v_)   (0) /* not used */
 
#define ESP32_SYSVIEW_USER_BLOCK_HDR_SZ   2
 
#define ESP32_SYSVIEW_USER_BLOCK_LEN(_v_)   (_v_)
 
#define SYSVIEW_BLOCK_SIZE_OFFSET   0
 
#define SYSVIEW_WR_SIZE_OFFSET   1
 

Functions

int esp32_sysview_cmd_cleanup (struct esp32_apptrace_cmd_ctx *cmd_ctx)
 
int esp32_sysview_cmd_init (struct esp32_apptrace_cmd_ctx *cmd_ctx, struct command_invocation *cmd, int mode, bool mcore_format, const char **argv, int argc)
 
static int esp32_sysview_core_id_get (struct target *target, uint8_t *hdr_buf)
 
int esp32_sysview_process_data (struct esp32_apptrace_cmd_ctx *ctx, unsigned int core_id, uint8_t *data, uint32_t data_len)
 
static int esp32_sysview_process_packet (struct esp32_apptrace_cmd_ctx *ctx, unsigned int pkt_core_id, uint16_t event_id, uint32_t delta, uint32_t delta_len, uint32_t pkt_len, uint8_t *pkt_buf)
 
static uint32_t esp32_sysview_usr_block_len_get (struct target *target, uint8_t *hdr_buf, uint32_t *wr_len)
 
static int esp32_sysview_write_packet (struct esp32_sysview_cmd_data *cmd_data, int pkt_core_id, uint32_t pkt_len, uint8_t *pkt_buf, uint32_t delta_len, uint8_t *delta_buf)
 
static uint16_t esp_sysview_decode_plen (uint8_t **ptr)
 
static uint32_t esp_sysview_decode_u32 (uint8_t **ptr)
 
static uint16_t esp_sysview_get_predef_payload_len (uint16_t id, uint8_t *pkt)
 
static uint16_t esp_sysview_parse_packet (uint8_t *pkt_buf, uint32_t *pkt_len, unsigned int *pkt_core_id, uint32_t *delta, uint32_t *delta_len, bool clear_core_bit)
 
static int esp_sysview_trace_header_write (struct esp32_apptrace_cmd_ctx *ctx, bool mcore_format)
 
static void sysview_encode_u32 (uint8_t **dest, uint32_t val)
 

Macro Definition Documentation

◆ ESP32_SYSVIEW_USER_BLOCK_CORE

#define ESP32_SYSVIEW_USER_BLOCK_CORE (   _v_)    (0) /* not used */

Definition at line 18 of file esp32_sysview.c.

◆ ESP32_SYSVIEW_USER_BLOCK_HDR_SZ

#define ESP32_SYSVIEW_USER_BLOCK_HDR_SZ   2

Definition at line 20 of file esp32_sysview.c.

◆ ESP32_SYSVIEW_USER_BLOCK_LEN

#define ESP32_SYSVIEW_USER_BLOCK_LEN (   _v_)    (_v_)

Definition at line 19 of file esp32_sysview.c.

◆ SYSVIEW_BLOCK_SIZE_OFFSET

#define SYSVIEW_BLOCK_SIZE_OFFSET   0

Definition at line 26 of file esp32_sysview.c.

◆ SYSVIEW_WR_SIZE_OFFSET

#define SYSVIEW_WR_SIZE_OFFSET   1

Definition at line 27 of file esp32_sysview.c.

Function Documentation

◆ esp32_sysview_cmd_cleanup()

◆ esp32_sysview_cmd_init()

◆ esp32_sysview_core_id_get()

static int esp32_sysview_core_id_get ( struct target target,
uint8_t *  hdr_buf 
)
static

Definition at line 124 of file esp32_sysview.c.

Referenced by esp32_sysview_cmd_init().

◆ esp32_sysview_process_data()

◆ esp32_sysview_process_packet()

◆ esp32_sysview_usr_block_len_get()

static uint32_t esp32_sysview_usr_block_len_get ( struct target target,
uint8_t *  hdr_buf,
uint32_t *  wr_len 
)
static

◆ esp32_sysview_write_packet()

static int esp32_sysview_write_packet ( struct esp32_sysview_cmd_data cmd_data,
int  pkt_core_id,
uint32_t  pkt_len,
uint8_t *  pkt_buf,
uint32_t  delta_len,
uint8_t *  delta_buf 
)
static

◆ esp_sysview_decode_plen()

static uint16_t esp_sysview_decode_plen ( uint8_t **  ptr)
static

Definition at line 196 of file esp32_sysview.c.

Referenced by esp_sysview_parse_packet().

◆ esp_sysview_decode_u32()

static uint32_t esp_sysview_decode_u32 ( uint8_t **  ptr)
static

◆ esp_sysview_get_predef_payload_len()

◆ esp_sysview_parse_packet()

static uint16_t esp_sysview_parse_packet ( uint8_t *  pkt_buf,
uint32_t *  pkt_len,
unsigned int *  pkt_core_id,
uint32_t *  delta,
uint32_t *  delta_len,
bool  clear_core_bit 
)
static

◆ esp_sysview_trace_header_write()

◆ sysview_encode_u32()

static void sysview_encode_u32 ( uint8_t **  dest,
uint32_t  val 
)
static

Definition at line 170 of file esp32_sysview.c.

Referenced by esp32_sysview_process_packet().