Best way to using SEGGER SYSVIEW for tracing data from FreeRTOS

michael012
Posts: 1
Joined: Sun May 03, 2020 7:46 pm

Best way to using SEGGER SYSVIEW for tracing data from FreeRTOS

Postby michael012 » Mon May 04, 2020 2:55 pm

Hi,
My System
----------------
i use ESP-IDF 3.3 and want to know more about my FreeRTOS threds on runtime.
I dont use a JTAG debugger. So i have no interface like RTT ...
I am debugging at the moment by printf to console.
My board is a ESP32 DEVKITv1

SEGGER SYSTEM VIEW as PC TOOL
---------------------------------------------
I discovered the possibility in SEGGER SYSVIEW to show system trace data in a very comfortable way.
SEGGER SYSTEM VIEW supports different ways to receive data.
- Receive on runtime with JTAG and RTT. (not possible in my case, because i dont have JTAG)
- Read a File for example from SD-CARD. (i could do this by writing a stream to SD-Card)
- Read Data over UART. (i could do this by wirting a stream to a second UART in high speed mode)
Segger supports a "Data Recorder" functionality to receive such a bytestream (over UART).

Code for ESP32
---------------------
I found the documentation to enable collecting data for sysview and enabled the sysview option in the menuconfig configuration
Component config > Application Level Tracing > FreeRTOS SystemView Tracing (CONFIG_SYSVIEW_ENABLE)

https://docs.espressif.com/projects/esp ... trace.html
-> Part : "System Behavior Analysis with SEGGER SystemView"

// Include the library
#include "esp_app_trace.h"
// Init collecting trace data
if(esp_apptrace_init() != ESP_OK)
{ printf("ERROR ESP APP TRACE INIT FAILED !\n"); }
else
{ printf("ESP APP TRACE INIT --> COMPLETE\n"); }

// Start example (from documentation) to collect data
esp32 sysview start file://pro-cpu.SVDat file://app-cpu.SVDat ???????

My question:
- Is it possible to streaming System Data to a FILE stream (as result on SD-CARD or an UART Port) ?
- Does anyone have sample code to collect data for SEGGER SYSVIEW ?
- What is the function so start streaming data to a stream ?

Best regards
Michael

manel_issaoui
Posts: 2
Joined: Mon Jul 19, 2021 10:31 am

Re: Best way to using SEGGER SYSVIEW for tracing data from FreeRTOS

Postby manel_issaoui » Thu Jul 22, 2021 1:30 pm

Hello ,
Please can you provide me with an example of code to collect data over UART , I've been struggling the whole week to record data o segger sysview over UART but I couldn't and I did not find enough documentation about this topic,
Thank you in advance

Who is online

Users browsing this forum: Google [Bot], twompark and 88 guests