blob: 2233f3f8bcbc234b7b3db41e8dbae7734ef52761 [file] [log] [blame]
#ifndef _MCF_DEBUG_H
#define _MCF_DEBUG_H
#include "TrcMod.h"
#include "mcf_trace.h"
#include "dhl_trace.h"
#include <ex_public.h>
/*
* Use DHL logging.
*/
/*#define mcf_trace_error(...) \
do{ \
if(INT_QueryExceptionStatus() == KAL_FALSE) \
{ \
dhl_trace(TRACE_ERROR, DHL_USER_FLAG_NONE, __VA_ARGS__); \
} \
}while(0)*/
/*#define mcf_trace_warn(...) \
do{ \
if(INT_QueryExceptionStatus() == KAL_FALSE) \
{ \
dhl_trace(TRACE_ERROR, DHL_USER_FLAG_NONE, __VA_ARGS__); \
} \
}while(0)*/
/*#define mcf_trace_info(...) \
do{ \
if(INT_QueryExceptionStatus() == KAL_FALSE) \
{ \
dhl_trace(TRACE_INFO, DHL_USER_FLAG_NONE, __VA_ARGS__); \
} \
}while(0)*/
/*#define mcf_trace_func(...) \
do{ \
if(INT_QueryExceptionStatus() == KAL_FALSE) \
{ \
dhl_trace(TRACE_FUNC, DHL_USER_FLAG_NONE, __VA_ARGS__); \
} \
}while(0)*/
typedef struct {
char log_format[200];
} MCF_BOOT_LOG;
#undef BOOT_TRC_MSG
#define BOOT_TRC_MSG(_name,_format) _name,
typedef enum _mcf_boot_trace_enum{
#include "mcf_boot_trace.h"
} mcf_boot_trace_enum;
#define END_PATTERN 0xDEADDEAD
// trace_enum, MCF_TYPE_ENUM, value, MCF_TYPE_ENUM, value, MCF_TYPE_ENUM, value, ...
#define MCF_BOOT_TRACE(_trace_enum, ...) \
do{ \
if (kal_query_systemInit() == KAL_TRUE) \
{ \
mcf_write_boot_trace(_trace_enum, ##__VA_ARGS__, END_PATTERN); \
} \
}while(0)
#if defined(ATEST_SYS_MCF) && !defined(__MTK_TARGET__)
#ifndef __SE7_SD8_AUTO_UT__
#define MCF_BOOT_PRINT(...) printf(__VA_ARGS__);
#else
#define MCF_BOOT_PRINT(...)
#endif
#else
#define MCF_BOOT_PRINT(...) dhl_print(TRACE_INFO, DHL_USER_FLAG_NONE, MOD_MCF, __VA_ARGS__);
#endif
#endif /* _MCF_DEBUG_H */