Problem in JTAG tracing

MattiaBerton
Posts: 27
Joined: Thu Aug 30, 2018 8:16 am

Problem in JTAG tracing

Postby MattiaBerton » Fri Sep 23, 2022 10:39 am

Hello,
I'm using an ESP32 with J-link as JTAG probe. I would like to trace data to see my log in SystemView, but I have some problems:
I enabled the apptrace in menuconfig:

Code: Select all

#
# Application Level Tracing
#
CONFIG_APPTRACE_DEST_JTAG=y
# CONFIG_APPTRACE_DEST_NONE is not set
CONFIG_APPTRACE_DEST_TRAX=y
CONFIG_APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE=y
CONFIG_APPTRACE_ENABLE=y
CONFIG_APPTRACE_ONPANIC_HOST_FLUSH_TMO=-1
CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH=0
CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX=0

#
# FreeRTOS SystemView Tracing
#
CONFIG_APPTRACE_SV_ENABLE=y
CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_00=y
# CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_01 is not set
# CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_10 is not set
# CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_11 is not set
# CONFIG_APPTRACE_SV_TS_SOURCE_ESP_TIMER is not set
CONFIG_APPTRACE_SV_MAX_TASKS=16
CONFIG_APPTRACE_SV_BUF_WAIT_TMO=500
CONFIG_APPTRACE_SV_EVT_OVERFLOW_ENABLE=y
CONFIG_APPTRACE_SV_EVT_ISR_ENTER_ENABLE=y
CONFIG_APPTRACE_SV_EVT_ISR_EXIT_ENABLE=y
CONFIG_APPTRACE_SV_EVT_ISR_TO_SCHED_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TASK_START_EXEC_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TASK_STOP_EXEC_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TASK_START_READY_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TASK_STOP_READY_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TASK_CREATE_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TASK_TERMINATE_ENABLE=y
CONFIG_APPTRACE_SV_EVT_IDLE_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TIMER_ENTER_ENABLE=y
CONFIG_APPTRACE_SV_EVT_TIMER_EXIT_ENABLE=y
# end of FreeRTOS SystemView Tracing
# end of Application Level Tracing
I connected succesfully to telnet in my JTAG session, but as I launch the command (I tried all values after app.bin, 0, 10, 100, none works):

Code: Select all

esp sysview start file:///tmp/pro.bin file:///tmp/app.bin 10 -1 -1
The program stops in

Code: Select all

static inline void cpu_ll_waiti(void)
{
    asm volatile ("waiti 0\n");
}
I can continue, and the program works smooth, and also the app_trace seems to work, but as I stop the app_trace with the command esp sysview stop and try to watch the log into Systemview, it gives me an error loading that file. I attach one log.
This happen both with a firmware I'm developing, and with the example "sysview_tracing".
Also, if I use the NVS with the API nvs_flash_init(), the program crash as soon as it executes that instruction:
Guru Meditation Error: Core 0 panic'ed (Cache disabled but cached memory region accessed).


Can you help me?
Thank you,
Mattia Berton
Attachments
pro-cpu.txt
(108.89 KiB) Downloaded 131 times

MattiaBerton
Posts: 27
Joined: Thu Aug 30, 2018 8:16 am

Re: Problem in JTAG tracing

Postby MattiaBerton » Sun Sep 25, 2022 12:16 pm

Any ideas?

Who is online

Users browsing this forum: MicroController and 103 guests