segger/sysview: add up_perf_freq result chaeck

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-01-06 11:04:08 +08:00 committed by Xiang Xiao
parent 6d70b91a55
commit 2e4c4822eb

View File

@ -375,6 +375,12 @@ int note_sysview_initialize(void)
note_sysview_send_tasklist,
};
if (freq == 0)
{
syslog(LOG_ERR, "up_perf isn't initialized, sysview isn't available");
PANIC();
}
SEGGER_SYSVIEW_Init(freq, freq, &g_sysview_trace_api,
note_sysview_send_description);