6e8775ff84
Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an undesirable API for the following reasons: - it's inconsistent with the rest of the DT_NODE_HAS_FOO names - DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand for macros which are equivalent to DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) && - DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck - DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway - it is seen as a somewhat aesthetically challenged name Replace all users with DT_NODE_HAS_STATUS(..., okay), which is semantically equivalent. This is mostly done with sed, but a few remaining cases were done by hand, along with whitespace, docs, and comment changes. These special cases include the Nordic SOC static assert files. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
32 lines
889 B
C
32 lines
889 B
C
/*
|
|
* Copyright (c) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <kernel.h>
|
|
#include <SEGGER_SYSVIEW.h>
|
|
#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(sys_clock_hw_cycles_per_sec(),
|
|
sys_clock_hw_cycles_per_sec(),
|
|
&SYSVIEW_X_OS_TraceAPI, cbSendSystemDesc);
|
|
#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_sram), okay)
|
|
SEGGER_SYSVIEW_SetRAMBase(DT_REG_ADDR(DT_CHOSEN(zephyr_sram)));
|
|
#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
|
|
}
|