PDK API Guide for J721E
DebugP

Introduction

DebugP interface

Functions

void Osal_DebugP_assert_fcn (bool expression, const char *file, int32_t line)
 Assert checking function. More...
 
void DebugP_exceptionLog (const char *format, uint32_t arg1, uint32_t arg2)
 DebugP Exception state log function. It takes a pair of values to be printed during exception dump. More...
 
void DebugP_log0 (const char *format)
 Debug log function with 0 parameters. More...
 
int32_t DebugP_registerExcptnLogFxn (DebugP_exptnLogFxn fxn)
 Debug log function registration. More...
 
void DebugP_deRegisterExcptnLogFxn (void)
 Debug log function deregistration. More...
 
void DebugP_log1 (const char *format, uintptr_t p1)
 Debug log function with 1 parameters. More...
 
void DebugP_log2 (const char *format, uintptr_t p1, uintptr_t p2)
 Debug log function with 2 parameters. More...
 
void DebugP_log3 (const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3)
 Debug log function with 3 parameters. More...
 
void DebugP_log4 (const char *format, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4)
 Debug log function with 4 parameters. More...
 

Typedefs

typedef void(* DebugP_exptnLogFxn) (const char *format,...)
 Assert Enabled. More...
 

Macros

#define DebugP_ASSERT_ENABLED   1
 
#define DebugP_LOG_ENABLED   1
 
#define DEBUGP_LOGFXN_REGISTER_SUCCESS   (0)
 DebugP Log Function registration return types. More...
 
#define DEBUGP_LOGFXN_ALREADY_REGISTERD   (-1)
 
#define DebugP_assert(expression)
 

Macro Definition Documentation

◆ DebugP_ASSERT_ENABLED

#define DebugP_ASSERT_ENABLED   1

◆ DebugP_LOG_ENABLED

#define DebugP_LOG_ENABLED   1

◆ DEBUGP_LOGFXN_REGISTER_SUCCESS

#define DEBUGP_LOGFXN_REGISTER_SUCCESS   (0)

DebugP Log Function registration return types.

DEBUGP_PRINTFXN_REGISTER_SUCCESS is returned on succesful registration of log API. DEBUGP_PRINTFXN_ALREADY_REGISTERD is returned, if an API is already registered.

◆ DEBUGP_LOGFXN_ALREADY_REGISTERD

#define DEBUGP_LOGFXN_ALREADY_REGISTERD   (-1)

◆ DebugP_assert

#define DebugP_assert (   expression)
Value:
(Osal_DebugP_assert_fcn(expression, \
__FILE__, __LINE__))
void Osal_DebugP_assert_fcn(bool expression, const char *file, int32_t line)
Assert checking function.

Typedef Documentation

◆ DebugP_exptnLogFxn

typedef void(* DebugP_exptnLogFxn) (const char *format,...)

Assert Enabled.

The defintion is used to control the feature if assertions are to be enabled or not. This flag can be enabled for debug builds by changing the file OR through the makefile.

Log Enabled

The defintion is used to plug the logging API to the OS provided logging mechansim Application developers can port the backend Logging API as per their requirements

DebugP Log Function signature to be used for printing

Function Documentation

◆ Osal_DebugP_assert_fcn()

void Osal_DebugP_assert_fcn ( bool  expression,
const char *  file,
int32_t  line 
)

Assert checking function.

If the expression is evaluated to true, the API does nothing. If it is evaluated to false, the underlying RTOS port implementation handles the assert via its mechanisms.

Parameters
expressionExpression to evaluate
fileFile name
lineLine number where evaluation occurs
See also
DebugP_ASSERT_ENABLED

◆ DebugP_exceptionLog()

void DebugP_exceptionLog ( const char *  format,
uint32_t  arg1,
uint32_t  arg2 
)

DebugP Exception state log function. It takes a pair of values to be printed during exception dump.

Parameters
format"printf" format string
arg1first parameter to format string
arg2second parameter to format string
See also
DebugP_LOG_ENABLED

◆ DebugP_log0()

void DebugP_log0 ( const char *  format)

Debug log function with 0 parameters.

The underlying RTOS port implementation handles the logging via its mechanisms.

Parameters
format"printf" format string
See also
DebugP_LOG_ENABLED

◆ DebugP_registerExcptnLogFxn()

int32_t DebugP_registerExcptnLogFxn ( DebugP_exptnLogFxn  fxn)

Debug log function registration.

Application needs to call this API to register its print API.

Parameters
fxnFunction pointer for print function to be registerd.
See also
DebugP_LOG_ENABLED

◆ DebugP_deRegisterExcptnLogFxn()

void DebugP_deRegisterExcptnLogFxn ( void  )

Debug log function deregistration.

Application needs to call this API to de-register its print API.

See also
DebugP_LOG_ENABLED

◆ DebugP_log1()

void DebugP_log1 ( const char *  format,
uintptr_t  p1 
)

Debug log function with 1 parameters.

The underlying RTOS port implementation handles the logging via its mechanisms.

Parameters
format"printf" format string
p1first parameter to format string

◆ DebugP_log2()

void DebugP_log2 ( const char *  format,
uintptr_t  p1,
uintptr_t  p2 
)

Debug log function with 2 parameters.

The underlying RTOS port implementation handles the logging via its mechanisms.

Parameters
format"printf" format string
p1first parameter to format string
p2second parameter to format string

◆ DebugP_log3()

void DebugP_log3 ( const char *  format,
uintptr_t  p1,
uintptr_t  p2,
uintptr_t  p3 
)

Debug log function with 3 parameters.

The underlying RTOS port implementation handles the logging via its mechanisms.

Parameters
format"printf" format string
p1first parameter to format string
p2second parameter to format string
p3third parameter to format string

◆ DebugP_log4()

void DebugP_log4 ( const char *  format,
uintptr_t  p1,
uintptr_t  p2,
uintptr_t  p3,
uintptr_t  p4 
)

Debug log function with 4 parameters.

The underlying RTOS port implementation handles the logging via its mechanisms.

Parameters
format"printf" format string
p1first parameter to format string
p2second parameter to format string
p3third parameter to format string
p4fourth parameter to format string