|
3 | 3 | *
|
4 | 4 | * SPDX-License-Identifier: BSD-1-Clause
|
5 | 5 | *
|
6 |
| - * SPDX-FileContributor: 2017-2022 Espressif Systems (Shanghai) CO LTD |
| 6 | + * SPDX-FileContributor: 2017-2024 Espressif Systems (Shanghai) CO LTD |
7 | 7 | */
|
8 | 8 | /*********************************************************************
|
9 | 9 | * SEGGER Microcontroller GmbH *
|
@@ -58,6 +58,7 @@ File : SEGGER_SYSVIEW_Config_FreeRTOS.c
|
58 | 58 | Purpose : Sample setup configuration of SystemView with FreeRTOS.
|
59 | 59 | Revision: $Rev: 7745 $
|
60 | 60 | */
|
| 61 | +#include <string.h> |
61 | 62 | #include "sdkconfig.h"
|
62 | 63 | #include "freertos/FreeRTOS.h"
|
63 | 64 | #include "SEGGER_SYSVIEW.h"
|
@@ -156,15 +157,16 @@ static esp_apptrace_lock_t s_sys_view_lock = {.mux = portMUX_INITIALIZER_UNLOCKE
|
156 | 157 | * Sends SystemView description strings.
|
157 | 158 | */
|
158 | 159 | static void _cbSendSystemDesc(void) {
|
159 |
| - char irq_str[32]; |
| 160 | + char irq_str[32] = "I#"; |
160 | 161 | SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",C="SYSVIEW_CORE_NAME",O=FreeRTOS");
|
161 |
| - snprintf(irq_str, sizeof(irq_str), "I#%d=SysTick", SYSTICK_INTR_ID); |
| 162 | + strcat(itoa(SYSTICK_INTR_ID, irq_str + 2, 10), "=SysTick"); |
162 | 163 | SEGGER_SYSVIEW_SendSysDesc(irq_str);
|
163 | 164 | size_t isr_count = sizeof(esp_isr_names)/sizeof(esp_isr_names[0]);
|
164 | 165 | for (size_t i = 0; i < isr_count; ++i) {
|
165 | 166 | if (esp_isr_names[i] == NULL || (ETS_INTERNAL_INTR_SOURCE_OFF + i) == SYSTICK_INTR_ID)
|
166 | 167 | continue;
|
167 |
| - snprintf(irq_str, sizeof(irq_str), "I#%d=%s", ETS_INTERNAL_INTR_SOURCE_OFF + i, esp_isr_names[i]); |
| 168 | + strcat(itoa(ETS_INTERNAL_INTR_SOURCE_OFF + i, irq_str + 2, 10), "="); |
| 169 | + strncat(irq_str, esp_isr_names[i], sizeof(irq_str) - strlen(irq_str) - 1); |
168 | 170 | SEGGER_SYSVIEW_SendSysDesc(irq_str);
|
169 | 171 | }
|
170 | 172 | }
|
|
0 commit comments