fix: improve field diagnostics and mirror logs to USB CDC

This commit is contained in:
chenjintao
2026-10-20 14:46:08 +08:00
parent 8bff1f569e
commit 07094d4a4e
20 changed files with 1036 additions and 200 deletions
+6 -1
View File
@@ -25,6 +25,11 @@ harness = r'''
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include "net_diag.h"
#include "net_diag_voice.h"
void net_diag_voice_begin(unsigned int round) { (void)round; }
void net_diag_voice_mark(unsigned int round, int stage) { (void)round; (void)stage; }
void net_diag_event(const char *event, int code) { (void)event; (void)code; }
typedef void *ql_mutex_t;
static int g_mic_working, recording, shine_init, fota_start;
enum { STATE_IDLE, STATE_RECORDING_WAIT_SOUND, STATE_RECORDING_ACTIVE, STATE_WAITING_COMMAND };
@@ -214,5 +219,5 @@ with tempfile.TemporaryDirectory(prefix='banban-timeout-') as directory:
cfile = Path(directory) / 'timeout.c'
exe = Path(directory) / 'timeout-test'
cfile.write_text(harness)
subprocess.run(['cc', '-std=c99', '-Wall', '-Wextra', '-Werror', str(cfile), '-o', str(exe)], check=True)
subprocess.run(['cc', '-std=c99', '-Wall', '-Wextra', '-Werror', '-I' + str(root / 'ql-application/threadx/interface/custom_app/inc'), str(cfile), '-o', str(exe)], check=True)
subprocess.run([str(exe)], check=True)