mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
sysview: fix tiemrgroup as sv timestamp
This commit is contained in:
parent
7cd4c4d542
commit
0c7b43c3b0
@ -117,13 +117,13 @@ extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;
|
||||
#define SYSVIEW_TIMESTAMP_FREQ (esp_clk_apb_freq() / SYSVIEW_TIMER_DIV)
|
||||
|
||||
// Timer ID and group ID
|
||||
#if defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_00) || defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_01)
|
||||
#if defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_00) || defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_10)
|
||||
#define TS_TIMER_ID 0
|
||||
#else
|
||||
#define TS_TIMER_ID 1
|
||||
#endif // TIMER_00 || TIMER_01
|
||||
|
||||
#if defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_00) || defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_10)
|
||||
#if defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_00) || defined(CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_01)
|
||||
#define TS_TIMER_GROUP 0
|
||||
#else
|
||||
#define TS_TIMER_GROUP 1
|
||||
|
@ -67,7 +67,7 @@ static void example_sysview_event_send(uint32_t id, uint32_t val)
|
||||
{
|
||||
U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32];
|
||||
|
||||
U8* pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket);
|
||||
U8 *pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket);
|
||||
pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, val); // Add the parameter to the packet
|
||||
SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, s_example_sysview_module.EventOffset + id);
|
||||
}
|
||||
@ -176,14 +176,23 @@ void app_main(void)
|
||||
// Wait untill SystemView module receives START command from host,
|
||||
// after that data can be sent to the host using onboard API,
|
||||
// so user module description does not need to be requested by OpenOCD itself.
|
||||
while(!SEGGER_SYSVIEW_Started()) {
|
||||
while (!SEGGER_SYSVIEW_Started()) {
|
||||
vTaskDelay(1);
|
||||
}
|
||||
SEGGER_SYSVIEW_RegisterModule(&s_example_sysview_module);
|
||||
#endif
|
||||
|
||||
#if !CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_10
|
||||
example_timer_init(TIMER_GROUP_1, TIMER_0, 2000);
|
||||
#else
|
||||
#warning "Timer (Group 1, Timer 0) is used by sysview module itself!"
|
||||
#endif
|
||||
|
||||
#if !CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_00
|
||||
example_timer_init(TIMER_GROUP_0, TIMER_0, 4000);
|
||||
#else
|
||||
#warning "Timer (Group 0, Timer 0) is used by sysview module itself!"
|
||||
#endif
|
||||
|
||||
xTaskCreatePinnedToCore(example_task, "svtrace0", 2048, &event_data[0], 3, &event_data[0].thnd, 0);
|
||||
ESP_LOGI(TAG, "Created task %p", event_data[0].thnd);
|
||||
|
@ -8,7 +8,7 @@ CONFIG_APPTRACE_DEST_JTAG=y
|
||||
CONFIG_APPTRACE_ENABLE=y
|
||||
# Enable FreeRTOS SystemView Tracing by default
|
||||
CONFIG_APPTRACE_SV_ENABLE=y
|
||||
CONFIG_APPTRACE_SV_TS_SOURCE_TIMER_00=y
|
||||
CONFIG_APPTRACE_SV_TS_SOURCE_ESP_TIMER=y
|
||||
CONFIG_APPTRACE_SV_EVT_OVERFLOW_ENABLE=y
|
||||
CONFIG_APPTRACE_SV_EVT_ISR_ENTER_ENABLE=y
|
||||
CONFIG_APPTRACE_SV_EVT_ISR_EXIT_ENABLE=y
|
||||
|
Loading…
x
Reference in New Issue
Block a user