Skip to content

Commit a083766

Browse files
committed
Merge branch 'apptrace_changes' into 'master'
Apptrace improvements Closes IDF-11982 See merge request espressif/esp-idf!40407
2 parents f8ebe0c + f78d6d6 commit a083766

File tree

20 files changed

+197
-331
lines changed

20 files changed

+197
-331
lines changed

components/app_trace/Kconfig

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,6 @@ menu "Application Level Tracing"
191191
help
192192
Size of the memory buffer for trace data in bytes.
193193

194-
config APPTRACE_PENDING_DATA_SIZE_MAX
195-
int "Size of the pending data buffer"
196-
depends on APPTRACE_MEMBUFS_APPTRACE_PROTO_ENABLE
197-
default 0
198-
help
199-
Size of the buffer for events in bytes. It is useful for buffering events from
200-
the time critical code (scheduler, ISRs etc). If this parameter is 0 then
201-
events will be discarded when main HW buffer is full.
202-
203194
menu "FreeRTOS SystemView Tracing"
204195
depends on APPTRACE_ENABLE
205196
config APPTRACE_SV_ENABLE

components/app_trace/app_trace_membufs_proto.c

Lines changed: 27 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const static char *TAG = "esp_apptrace";
5252

5353
static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membufs_proto_data_t *proto, uint8_t *data, uint32_t size);
5454

55-
5655
esp_err_t esp_apptrace_membufs_init(esp_apptrace_membufs_proto_data_t *proto, const esp_apptrace_mem_block_t blocks_cfg[2])
5756
{
5857
// disabled by default
@@ -64,10 +63,6 @@ esp_err_t esp_apptrace_membufs_init(esp_apptrace_membufs_proto_data_t *proto, co
6463
proto->state.markers[i] = 0;
6564
}
6665
proto->state.in_block = 0;
67-
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
68-
esp_apptrace_rb_init(&proto->rb_pend, proto->pending_data,
69-
sizeof(proto->pending_data));
70-
#endif
7166
return ESP_OK;
7267
}
7368

@@ -81,10 +76,10 @@ static esp_err_t esp_apptrace_membufs_swap(esp_apptrace_membufs_proto_data_t *pr
8176
{
8277
int prev_block_num = proto->state.in_block % 2;
8378
int new_block_num = prev_block_num ? (0) : (1);
84-
esp_err_t res = ESP_OK;
8579

86-
res = proto->hw->swap_start(proto->state.in_block);
80+
esp_err_t res = proto->hw->swap_start(proto->state.in_block);
8781
if (res != ESP_OK) {
82+
ESP_APPTRACE_LOGE("Failed to swap to new block: %d", res);
8883
return res;
8984
}
9085

@@ -101,40 +96,18 @@ static esp_err_t esp_apptrace_membufs_swap(esp_apptrace_membufs_proto_data_t *pr
10196
// TODO: add support for multiple blocks from host, currently there is no need for that
10297
uint8_t *p = proto->blocks[new_block_num].start + proto->blocks[new_block_num].sz;
10398
ESP_APPTRACE_LOGD("Recvd %" PRIu16 " bytes from host (@ %p) [%x %x %x %x %x %x %x %x .. %x %x %x %x %x %x %x %x]",
104-
hdr->block_sz, proto->blocks[new_block_num].start,
105-
*(proto->blocks[new_block_num].start+0), *(proto->blocks[new_block_num].start+1),
106-
*(proto->blocks[new_block_num].start+2), *(proto->blocks[new_block_num].start+3),
107-
*(proto->blocks[new_block_num].start+4), *(proto->blocks[new_block_num].start+5),
108-
*(proto->blocks[new_block_num].start+6), *(proto->blocks[new_block_num].start+7),
109-
*(p-8), *(p-7), *(p-6), *(p-5), *(p-4), *(p-3), *(p-2), *(p-1));
110-
uint32_t sz = esp_apptrace_membufs_down_buffer_write_nolock(proto, (uint8_t *)(hdr+1), hdr->block_sz);
99+
hdr->block_sz, proto->blocks[new_block_num].start,
100+
*(proto->blocks[new_block_num].start + 0), *(proto->blocks[new_block_num].start + 1),
101+
*(proto->blocks[new_block_num].start + 2), *(proto->blocks[new_block_num].start + 3),
102+
*(proto->blocks[new_block_num].start + 4), *(proto->blocks[new_block_num].start + 5),
103+
*(proto->blocks[new_block_num].start + 6), *(proto->blocks[new_block_num].start + 7),
104+
*(p - 8), *(p - 7), *(p - 6), *(p - 5), *(p - 4), *(p - 3), *(p - 2), *(p - 1));
105+
uint32_t sz = esp_apptrace_membufs_down_buffer_write_nolock(proto, (uint8_t *)(hdr + 1), hdr->block_sz);
111106
if (sz != hdr->block_sz) {
112107
ESP_APPTRACE_LOGE("Failed to write %" PRIu32 " bytes to down buffer (%" PRIu16 " %" PRIu32 ")!", hdr->block_sz - sz, hdr->block_sz, sz);
113108
}
114109
hdr->block_sz = 0;
115110
}
116-
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
117-
// copy pending data to block if any
118-
while (proto->state.markers[new_block_num] < proto->blocks[new_block_num].sz) {
119-
uint32_t read_sz = esp_apptrace_rb_read_size_get(&proto->rb_pend);
120-
if (read_sz == 0) {
121-
break; // no more data in pending buffer
122-
}
123-
if (read_sz > proto->blocks[new_block_num].sz - proto->state.markers[new_block_num]) {
124-
read_sz = proto->blocks[new_block_num].sz - proto->state.markers[new_block_num];
125-
}
126-
uint8_t *ptr = esp_apptrace_rb_consume(&proto->rb_pend, read_sz);
127-
if (!ptr) {
128-
assert(false && "Failed to consume pended bytes!!");
129-
break;
130-
}
131-
ESP_APPTRACE_LOGD("Pump %d pend bytes [%x %x %x %x : %x %x %x %x : %x %x %x %x : %x %x...%x %x]",
132-
read_sz, *(ptr+0), *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4),
133-
*(ptr+5), *(ptr+6), *(ptr+7), *(ptr+8), *(ptr+9), *(ptr+10), *(ptr+11), *(ptr+12), *(ptr+13), *(ptr+read_sz-2), *(ptr+read_sz-1));
134-
memcpy(proto->blocks[new_block_num].start + proto->state.markers[new_block_num], ptr, read_sz);
135-
proto->state.markers[new_block_num] += read_sz;
136-
}
137-
#endif
138111
proto->hw->swap_end(proto->state.in_block, proto->state.markers[prev_block_num]);
139112
return res;
140113
}
@@ -209,7 +182,7 @@ static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membu
209182

210183
while (total_sz < size) {
211184
ESP_APPTRACE_LOGD("esp_apptrace_trax_down_buffer_write_nolock WRS %" PRIu32 "-%" PRIu32 "-%" PRIu32 " %" PRIu32, proto->rb_down.wr, proto->rb_down.rd,
212-
proto->rb_down.cur_size, size);
185+
proto->rb_down.cur_size, size);
213186
uint32_t wr_sz = esp_apptrace_rb_write_size_get(&proto->rb_down);
214187
if (wr_sz == 0) {
215188
break;
@@ -231,45 +204,6 @@ static uint32_t esp_apptrace_membufs_down_buffer_write_nolock(esp_apptrace_membu
231204
return total_sz;
232205
}
233206

234-
static inline uint8_t *esp_apptrace_membufs_wait4buf(esp_apptrace_membufs_proto_data_t *proto, uint16_t size, esp_apptrace_tmo_t *tmo, int *pended)
235-
{
236-
uint8_t *ptr = NULL;
237-
238-
int res = esp_apptrace_membufs_swap_waitus(proto, tmo);
239-
if (res != ESP_OK) {
240-
return NULL;
241-
}
242-
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
243-
// check if we still have pending data
244-
if (esp_apptrace_rb_read_size_get(&proto->rb_pend) > 0) {
245-
// if after block switch we still have pending data (not all pending data have been pumped to block)
246-
// alloc new pending buffer
247-
*pended = 1;
248-
ptr = esp_apptrace_rb_produce(&proto->rb_pend, size);
249-
if (!ptr) {
250-
ESP_APPTRACE_LOGE("Failed to alloc pend buf 1: w-r-s %d-%d-%d!", proto->rb_pend.wr, proto->rb_pend.rd, proto->rb_pend.cur_size);
251-
}
252-
} else
253-
#endif
254-
{
255-
// update block pointers
256-
if (ESP_APPTRACE_INBLOCK_MARKER(proto) + size > ESP_APPTRACE_INBLOCK(proto)->sz) {
257-
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
258-
*pended = 1;
259-
ptr = esp_apptrace_rb_produce(&proto->rb_pend, size);
260-
if (ptr == NULL) {
261-
ESP_APPTRACE_LOGE("Failed to alloc pend buf 2: w-r-s %d-%d-%d!", proto->rb_pend.wr, proto->rb_pend.rd, proto->rb_pend.cur_size);
262-
}
263-
#endif
264-
} else {
265-
*pended = 0;
266-
ptr = ESP_APPTRACE_INBLOCK(proto)->start + ESP_APPTRACE_INBLOCK_MARKER(proto);
267-
}
268-
}
269-
270-
return ptr;
271-
}
272-
273207
static inline uint8_t *esp_apptrace_membufs_pkt_start(uint8_t *ptr, uint16_t size)
274208
{
275209
// it is safe to use esp_cpu_get_core_id() in macro call because arg is used only once inside it
@@ -287,63 +221,23 @@ static inline void esp_apptrace_membufs_pkt_end(uint8_t *ptr)
287221

288222
uint8_t *esp_apptrace_membufs_up_buffer_get(esp_apptrace_membufs_proto_data_t *proto, uint32_t size, esp_apptrace_tmo_t *tmo)
289223
{
290-
uint8_t *buf_ptr = NULL;
291-
292224
if (size > ESP_APPTRACE_USR_DATA_LEN_MAX(proto)) {
293225
ESP_APPTRACE_LOGE("Too large user data size %" PRIu32 "!", size);
294226
return NULL;
295227
}
296228

297-
// check for data in the pending buffer
298-
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
299-
if (esp_apptrace_rb_read_size_get(&proto->rb_pend) > 0) {
300-
// if we have buffered data try to switch block
301-
esp_apptrace_membufs_swap(proto);
302-
// if switch was successful, part or all pended data have been copied to block
303-
}
304-
if (esp_apptrace_rb_read_size_get(&proto->rb_pend) > 0) {
305-
// if we have buffered data alloc new pending buffer
306-
ESP_APPTRACE_LOGD("Get %d bytes from PEND buffer", size);
307-
buf_ptr = esp_apptrace_rb_produce(&proto->rb_pend, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
308-
if (buf_ptr == NULL) {
309-
int pended_buf;
310-
buf_ptr = esp_apptrace_membufs_wait4buf(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size), tmo, &pended_buf);
311-
if (buf_ptr && !pended_buf) {
312-
ESP_APPTRACE_LOGD("Get %d bytes from block", size);
313-
// update cur block marker
314-
ESP_APPTRACE_INBLOCK_MARKER_UPD(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
315-
}
316-
}
317-
} else {
318-
#else
319-
if (1) {
320-
#endif
321-
if (ESP_APPTRACE_INBLOCK_MARKER(proto) + ESP_APPTRACE_USR_BLOCK_RAW_SZ(size) > ESP_APPTRACE_INBLOCK(proto)->sz) {
322-
#if CONFIG_APPTRACE_PENDING_DATA_SIZE_MAX > 0
323-
ESP_APPTRACE_LOGD("Block full. Get %" PRIu32 " bytes from PEND buffer", size);
324-
buf_ptr = esp_apptrace_rb_produce(&proto->rb_pend, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
325-
#endif
326-
if (buf_ptr == NULL) {
327-
int pended_buf;
328-
ESP_APPTRACE_LOGD(" full. Get %" PRIu32 " bytes from pend buffer", size);
329-
buf_ptr = esp_apptrace_membufs_wait4buf(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size), tmo, &pended_buf);
330-
if (buf_ptr && !pended_buf) {
331-
ESP_APPTRACE_LOGD("Got %" PRIu32 " bytes from block", size);
332-
// update cur block marker
333-
ESP_APPTRACE_INBLOCK_MARKER_UPD(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
334-
}
335-
}
336-
} else {
337-
ESP_APPTRACE_LOGD("Get %" PRIu32 " bytes from buffer", size);
338-
// fit to curr nlock
339-
buf_ptr = ESP_APPTRACE_INBLOCK(proto)->start + ESP_APPTRACE_INBLOCK_MARKER(proto);
340-
// update cur block marker
341-
ESP_APPTRACE_INBLOCK_MARKER_UPD(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
229+
if (ESP_APPTRACE_INBLOCK_MARKER(proto) + ESP_APPTRACE_USR_BLOCK_RAW_SZ(size) > ESP_APPTRACE_INBLOCK(proto)->sz) {
230+
int res = esp_apptrace_membufs_swap_waitus(proto, tmo);
231+
if (res != ESP_OK) {
232+
return NULL;
342233
}
343234
}
344-
if (buf_ptr) {
345-
buf_ptr = esp_apptrace_membufs_pkt_start(buf_ptr, size);
346-
}
235+
236+
uint8_t *buf_ptr = ESP_APPTRACE_INBLOCK(proto)->start + ESP_APPTRACE_INBLOCK_MARKER(proto);
237+
// update cur block marker
238+
ESP_APPTRACE_INBLOCK_MARKER_UPD(proto, ESP_APPTRACE_USR_BLOCK_RAW_SZ(size));
239+
buf_ptr = esp_apptrace_membufs_pkt_start(buf_ptr, size);
240+
ESP_APPTRACE_LOGD("Got %" PRIu32 " bytes from block", size);
347241

348242
return buf_ptr;
349243
}
@@ -367,15 +261,16 @@ esp_err_t esp_apptrace_membufs_flush_nolock(esp_apptrace_membufs_proto_data_t *p
367261
ESP_APPTRACE_LOGI("Ignore flush request for min %" PRIu32 " bytes. Bytes in block: %" PRIu32, min_sz, ESP_APPTRACE_INBLOCK_MARKER(proto));
368262
return ESP_OK;
369263
}
370-
// switch block while size of data (including that in pending buffer) is more than min size
264+
// switch block while size of data is more than min size
371265
while (ESP_APPTRACE_INBLOCK_MARKER(proto) > min_sz) {
372-
ESP_APPTRACE_LOGD("Try to flush %" PRIu32 " bytes. Wait until block switch for %" PRIi64 " us", ESP_APPTRACE_INBLOCK_MARKER(proto), tmo->tmo);
266+
ESP_APPTRACE_LOGD("Try to flush %" PRIu32 " bytes", ESP_APPTRACE_INBLOCK_MARKER(proto));
373267
res = esp_apptrace_membufs_swap_waitus(proto, tmo);
374268
if (res != ESP_OK) {
375-
if (tmo->tmo != ESP_APPTRACE_TMO_INFINITE)
376-
ESP_APPTRACE_LOGW("Failed to switch to another block in %lld us!", tmo->tmo);
377-
else
378-
ESP_APPTRACE_LOGE("Failed to switch to another block in %lld us!", tmo->tmo);
269+
if (res == ESP_ERR_TIMEOUT) {
270+
ESP_APPTRACE_LOGW("Failed to switch to another block in %" PRIi32 " us!", (int32_t)tmo->elapsed);
271+
} else {
272+
ESP_APPTRACE_LOGE("Failed to switch to another block, res: %d", res);
273+
}
379274
return res;
380275
}
381276
}

components/app_trace/app_trace_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void esp_apptrace_log_unlock(void)
4444

4545
esp_err_t esp_apptrace_tmo_check(esp_apptrace_tmo_t *tmo)
4646
{
47-
if (tmo->tmo != (int64_t)-1) {
47+
if (tmo->tmo != (int64_t) -1) {
4848
tmo->elapsed = esp_timer_get_time() - tmo->start;
4949
if (tmo->elapsed >= tmo->tmo) {
5050
return ESP_ERR_TIMEOUT;

components/app_trace/gcov/gcov_rtio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void gcov_create_task(void *arg)
7373
{
7474
ESP_EARLY_LOGV(TAG, "%s", __FUNCTION__);
7575
xTaskCreatePinnedToCore(&gcov_dump_task, "gcov_dump_task", CONFIG_APPTRACE_GCOV_DUMP_TASK_STACK_SIZE,
76-
(void *)&s_gcov_task_running, configMAX_PRIORITIES - 1, NULL, 0);
76+
(void *)&s_gcov_task_running, configMAX_PRIORITIES - 1, NULL, 0);
7777
}
7878

7979
static IRAM_ATTR
@@ -180,7 +180,7 @@ int gcov_rtio_feof(void *stream)
180180
return ret;
181181
}
182182

183-
void gcov_rtio_setbuf(void *arg1 __attribute__ ((unused)), void *arg2 __attribute__ ((unused)))
183+
void gcov_rtio_setbuf(void *arg1 __attribute__((unused)), void *arg2 __attribute__((unused)))
184184
{
185185
return;
186186
}

components/app_trace/heap_trace_tohost.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ esp_err_t heap_trace_init_tohost(void)
3333
esp_err_t heap_trace_start(heap_trace_mode_t mode_param)
3434
{
3535
#if CONFIG_APPTRACE_SV_ENABLE
36-
esp_err_t ret = esp_sysview_heap_trace_start((uint32_t)-1);
36+
esp_err_t ret = esp_sysview_heap_trace_start((uint32_t) -1);
3737
if (ret != ESP_OK) {
3838
return ret;
3939
}

components/app_trace/host_file_io.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2017-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -152,7 +152,7 @@ void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char
152152
cmd_args.mode_len = strlen(mode) + 1;
153153

154154
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FOPEN, esp_apptrace_fopen_args_prepare,
155-
&cmd_args, cmd_args.path_len+cmd_args.mode_len);
155+
&cmd_args, cmd_args.path_len + cmd_args.mode_len);
156156
if (ret != ESP_OK) {
157157
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
158158
return NULL;
@@ -182,7 +182,7 @@ int esp_apptrace_fclose(esp_apptrace_dest_t dest, void *stream)
182182

183183
cmd_args.file = stream;
184184
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FCLOSE, esp_apptrace_fclose_args_prepare,
185-
&cmd_args, sizeof(cmd_args));
185+
&cmd_args, sizeof(cmd_args));
186186
if (ret != ESP_OK) {
187187
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
188188
return EOF;
@@ -211,7 +211,7 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
211211
{
212212
esp_apptrace_fwrite_args_t cmd_args;
213213

214-
ESP_EARLY_LOGV(TAG, "esp_apptrace_fwrite f %p l %d", stream, size*nmemb);
214+
ESP_EARLY_LOGV(TAG, "esp_apptrace_fwrite f %p l %d", stream, size * nmemb);
215215

216216
if (ptr == NULL) {
217217
return 0;
@@ -221,7 +221,7 @@ size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t siz
221221
cmd_args.size = size * nmemb;
222222
cmd_args.file = stream;
223223
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FWRITE, esp_apptrace_fwrite_args_prepare,
224-
&cmd_args, sizeof(cmd_args.file)+cmd_args.size);
224+
&cmd_args, sizeof(cmd_args.file) + cmd_args.size);
225225
if (ret != ESP_OK) {
226226
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
227227
return 0;
@@ -253,7 +253,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
253253
{
254254
esp_apptrace_fread_args_t cmd_args;
255255

256-
ESP_EARLY_LOGV(TAG, "esp_apptrace_fread f %p l %d", stream, size*nmemb);
256+
ESP_EARLY_LOGV(TAG, "esp_apptrace_fread f %p l %d", stream, size * nmemb);
257257

258258
if (ptr == NULL) {
259259
return 0;
@@ -262,7 +262,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
262262
cmd_args.size = size * nmemb;
263263
cmd_args.file = stream;
264264
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FREAD, esp_apptrace_fread_args_prepare,
265-
&cmd_args, sizeof(cmd_args));
265+
&cmd_args, sizeof(cmd_args));
266266
if (ret != ESP_OK) {
267267
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
268268
return 0;
@@ -288,7 +288,7 @@ size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size
288288
* fread(buf, 1 ,size, file);
289289
* So, total read bytes count returns
290290
*/
291-
return resp/size; // return the number of items read
291+
return resp / size; // return the number of items read
292292
}
293293

294294
static void esp_apptrace_fseek_args_prepare(uint8_t *buf, void *priv)
@@ -310,7 +310,7 @@ int esp_apptrace_fseek(esp_apptrace_dest_t dest, void *stream, long offset, int
310310
cmd_args.offset = offset;
311311
cmd_args.whence = whence;
312312
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FSEEK, esp_apptrace_fseek_args_prepare,
313-
&cmd_args, sizeof(cmd_args));
313+
&cmd_args, sizeof(cmd_args));
314314
if (ret != ESP_OK) {
315315
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
316316
return -1;
@@ -340,7 +340,7 @@ int esp_apptrace_ftell(esp_apptrace_dest_t dest, void *stream)
340340

341341
cmd_args.file = stream;
342342
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FTELL, esp_apptrace_ftell_args_prepare,
343-
&cmd_args, sizeof(cmd_args));
343+
&cmd_args, sizeof(cmd_args));
344344
if (ret != ESP_OK) {
345345
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
346346
return -1;
@@ -380,7 +380,7 @@ int esp_apptrace_feof(esp_apptrace_dest_t dest, void *stream)
380380

381381
cmd_args.file = stream;
382382
esp_err_t ret = esp_apptrace_file_cmd_send(dest, ESP_APPTRACE_FILE_CMD_FEOF, esp_apptrace_feof_args_prepare,
383-
&cmd_args, sizeof(cmd_args));
383+
&cmd_args, sizeof(cmd_args));
384384
if (ret != ESP_OK) {
385385
ESP_EARLY_LOGE(TAG, "Failed to send file cmd (%d)!", ret);
386386
return EOF;

0 commit comments

Comments
 (0)