SEGGER SYSVIEW over UART does not compuile (ESP32S3, IDF V5.1)

sukuwc
Posts: 2
Joined: Tue Jul 11, 2023 8:00 am

SEGGER SYSVIEW over UART does not compuile (ESP32S3, IDF V5.1)

Postby sukuwc » Tue Jul 11, 2023 8:07 am

I try to compile after enabling app level tracing over uart in menuconfig but i get the following compilation error. Note that the build works fine if I select app level tracing target to be JTAG!

My settings are:
Data Destination 1 (None) --->
Data Destination 2 (UART1) --->
(33) UART TX on GPIO#
(34) UART RX on GPIO#
(1000000) UART baud rate
(128) UART RX ring buffer size
(4096) UART TX ring buffer size
(128) UART TX message size
(1) UART Task Priority
(-1) Timeout for flushing last trace data to host on panic
(0) Threshold for flushing last trace data to host on panic
FreeRTOS SystemView Tracing --->

Inside FreeRTOS SystemView Tracing:
[*] SystemView Tracing Enable
SystemView destination (Data destination UART) --->
CPU to trace (CPU0) --->
Timer to use as timestamp source (General Purpose Timer (Timer Group)) --->
(16) Maximum supported tasks
(500) Trace buffer wait timeout
[*] Trace Buffer Overflow Event
[*] ISR Enter Event
[*] ISR Exit Event
[*] ISR Exit to Scheduler Event
[*] Task Start Execution Event
[*] Task Stop Execution Event
[*] Task Start Ready State Event
[*] Task Stop Ready State Event
[*] Task Create Event
[*] Task Terminate Event
[*] System Idle Event
[*] Timer Enter Event
[*] Timer Exit Event

Code: Select all

/opt/esp/idf/components/app_trace/sys_view/esp/SEGGER_RTT_esp.c: In function 'SEGGER_RTT_WriteSkipNoLock':
/opt/esp/idf/components/app_trace/sys_view/esp/SEGGER_RTT_esp.c:170:20: error: 'SYSVIEW_EVTID_USER_START' undeclared (first use in this function); did you mean 'SYSVIEW_EVTID_MARK_START'?
  170 |       (event_id == SYSVIEW_EVTID_USER_START) ||
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~
      |                    SYSVIEW_EVTID_MARK_START
/opt/esp/idf/components/app_trace/sys_view/esp/SEGGER_RTT_esp.c:170:20: note: each undeclared identifier is reported only once for each function it appears in
/opt/esp/idf/components/app_trace/sys_view/esp/SEGGER_RTT_esp.c:171:20: error: 'SYSVIEW_EVTID_USER_STOP' undeclared (first use in this function); did you mean 'SYSVIEW_EVTID_MARK_STOP'?
  171 |       (event_id == SYSVIEW_EVTID_USER_STOP) ||
      |                    ^~~~~~~~~~~~~~~~~~~~~~~
      |                    SYSVIEW_EVTID_MARK_STOP
[0/1] Re-running CMake...-- Building ESP-IDF components for target esp32s3

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: SEGGER SYSVIEW over UART does not compuile (ESP32S3, IDF V5.1)

Postby ESP_igrr » Tue Jul 11, 2023 10:14 am

This was fixed on master branch in https://github.com/espressif/esp-idf/co ... d28630f6ee, we will backport the fix to the next v5.1.1 bugfix release as well!

sukuwc
Posts: 2
Joined: Tue Jul 11, 2023 8:00 am

Re: SEGGER SYSVIEW over UART does not compuile (ESP32S3, IDF V5.1)

Postby sukuwc » Tue Jul 11, 2023 12:14 pm

I updated the toolchain to latest and now the project builds fine, however now the CPU crashes why accessing filesystem with the following dump:

Code: Select all

I (1145) main: ===== NVM START =====
Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed). 


Core  1 register dump:
PC      : 0x4203f176  PS      : 0x00060d34  A0      : 0x8037c4f9  A1      : 0x3fc9b7c0  
0x4203f176: uart_get_buffered_data_len at /opt/esp/idf/components/driver/uart/uart.c:1370

A2      : 0x3fcaa458  A3      : 0x3fc9b808  A4      : 0x00000000  A5      : 0x3fcae0a0  
A6      : 0x00000001  A7      : 0x4037a2f8  A8      : 0x8037d051  A9      : 0x3fc9b7a0  
0x4037a2f8: spi_flash_op_block_func at /opt/esp/idf/components/spi_flash/cache_utils.c:117

A10     : 0x3fc9b7c0  A11     : 0x3fc9b7c0  A12     : 0x4037a325  A13     : 0x3fc9b8f0  
0x4037a325: spi_flash_op_block_func at /opt/esp/idf/components/spi_flash/cache_utils.c:136 (discriminator 1)

A14     : 0x00000000  A15     : 0x3fc9a668  SAR     : 0x00000004  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  


Backtrace: 0x4203f173:0x3fc9b7c0 0x4037c4f6:0x3fc9b7f0 0x4037b529:0x3fc9b830 0x4037b7fd:0x3fc9b860 0x4037ba2d:0x3fc9b890 0x4037be32:0x3fc9b8b0 0x40376891:0x3fc9b8d0 0x40377b2d:0x3fc9b8f0 0x4037a322:0x3fcae080 0x4037b1c7:0x3fcae0a0 0x4038352d:0x3fcae0d0
0x4203f173: uart_read_bytes at /opt/esp/idf/components/driver/uart/uart.c:1367

0x4037c4f6: esp_apptrace_read at /opt/esp/idf/components/app_trace/app_trace.c:197

0x4037b529: SEGGER_RTT_ReadNoLock at /opt/esp/idf/components/app_trace/sys_view/esp/SEGGER_RTT_esp.c:126

0x4037b7fd: _HandleIncomingPacket at /opt/esp/idf/components/app_trace/sys_view/SEGGER/SEGGER_SYSVIEW.c:552

0x4037ba2d: _SendPacket at /opt/esp/idf/components/app_trace/sys_view/SEGGER/SEGGER_SYSVIEW.c:902

0x4037be32: SEGGER_SYSVIEW_RecordEnterISR at /opt/esp/idf/components/app_trace/sys_view/SEGGER/SEGGER_SYSVIEW.c:2055 (discriminator 4)

0x40376891: non_shared_intr_isr at /opt/esp/idf/components/esp_hw_support/intr_alloc.c:454

0x40377b2d: _xt_lowint1 at /opt/esp/idf/components/xtensa/xtensa_vectors.S:1236

0x4037a322: spi_flash_op_block_func at /opt/esp/idf/components/spi_flash/cache_utils.c:136 (discriminator 1)

0x4037b1c7: ipc_task at /opt/esp/idf/components/esp_system/esp_ipc.c:83

0x4038352d: vPortTaskWrapper at /opt/esp/idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162

Who is online

Users browsing this forum: Baidu [Spider] and 71 guests