2018-04-06 09:06:33 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2018-12-05 17:28:48 +08:00
|
|
|
#include <SEGGER_SYSVIEW.h>
|
2018-04-06 09:06:33 +08:00
|
|
|
#include "SEGGER_SYSVIEW_Zephyr.h"
|
|
|
|
|
|
|
|
static void _cbSendSystemDesc(void)
|
|
|
|
{
|
|
|
|
SEGGER_SYSVIEW_SendSysDesc("N=ZephyrSysView");
|
|
|
|
SEGGER_SYSVIEW_SendSysDesc("D=" CONFIG_BOARD " "
|
|
|
|
CONFIG_SOC_SERIES " " CONFIG_ARCH);
|
|
|
|
SEGGER_SYSVIEW_SendSysDesc("O=Zephyr");
|
|
|
|
}
|
|
|
|
|
|
|
|
void SEGGER_SYSVIEW_Conf(void)
|
|
|
|
{
|
|
|
|
SEGGER_SYSVIEW_Init(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC,
|
|
|
|
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC,
|
|
|
|
&SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc);
|
|
|
|
|
2018-11-13 22:15:23 +08:00
|
|
|
#if defined(DT_PHYS_RAM_ADDR) /* x86 */
|
|
|
|
SEGGER_SYSVIEW_SetRAMBase(DT_PHYS_RAM_ADDR);
|
2018-04-06 09:06:33 +08:00
|
|
|
#elif defined(CONFIG_SRAM_BASE_ADDRESS) /* arm, default */
|
|
|
|
SEGGER_SYSVIEW_SetRAMBase(CONFIG_SRAM_BASE_ADDRESS);
|
|
|
|
#else
|
|
|
|
/* Setting RAMBase is just an optimization: this value is subtracted
|
|
|
|
* from all pointers in order to save bandwidth. It's not an error
|
|
|
|
* if a platform does not set this value.
|
|
|
|
*/
|
|
|
|
#endif
|
|
|
|
}
|