AnsweredAssumed Answered

Power-On Self-Test (POST) project error visual dsp ++ 5.1.2

Question asked by caoleiwe on Jun 6, 2018
Latest reply on Jun 13, 2018 by caoleiwe

When i build the  "Power-On Self-Test (POST)" project of the visual dsp ++ 5.1.2 example on the ADSP-21489 EZ-Board,it occurs the below errors:

  

----------------Configuration: 21489_ezboard_post - Debug----------------
.\analog_audio_test.c
".\analog_audio_test.c", line 733: cc0020: error: identifier "pDebugFile" is
undefined
DEBUG_HEADER( "Analog Audio RCA Test" );
^

".\analog_audio_test.c", line 748: cc0020: error: identifier "pDebugFile" is
undefined
DEBUG_HEADER( "Analog Audio Differential Test" );
^

".\analog_audio_test.c", line 807: cc0020: error: identifier "pDebugFile" is
undefined
DEBUG_STATEMENT("\nTesting audio TDM 48 KHZ sample rate port 12......");
^

3 errors detected in the compilation of ".\analog_audio_test.c".
cc3089: fatal error: Compilation failed
Tool failed with exit/exception code: 1.
Build was unsuccessful.

 

Here, i want to make prints are directed to file __DEBUG_FILE_NAME__. So, the content in the post_debug.h are show below:

/****************************************************************
* defining one of these methods will enabling debug printing *
* These should be set in the Projects Preprocessor definitions *
****************************************************************/
#define __DEBUG_FILE__ /* prints are directed to file __DEBUG_FILE_NAME__ */
/* #define __DEBUG_UART__ */ /* prints are directed to the UART */
/* #define __DEBUG_VDSP__ */ /* prints are directed to the VDSP console window (MUCH SLOWER!!!) */
/**************************************************************/

 

and the identifier "pDebugFile" is actually defined in the "main.c" file.

*************/main.c/*************

#if defined(__DEBUG_FILE__)
FILE *pDebugFile; /* debug file when directing output to a file */
#endif

*****************************

 

 

There is also macro definition "#define DEBUG_STREAM pDebugFile" in the "post_debug.h" file

************/post_debug.h/**************

/* if printing to a file */
#if defined(__DEBUG_FILE__)
#undef _PRINT_CYCLES
#define __DEBUG_FILE_NAME__ "post_debug.txt" /* output file name */
#define DEBUG_STREAM pDebugFile
#define _PRINT_CYCLES(_STRG, _DAT) fprintf(DEBUG_STREAM,"%s%llu\n", (_STRG), (_DAT)) __TRAILING_SC__
#define DEBUG_CLOSE() fclose(DEBUG_STREAM)
#define DEBUG_PRINT(fmt,...) fprintf(DEBUG_STREAM,fmt, __VA_ARGS__);
#define DEBUG_STATEMENT(statement) fprintf(DEBUG_STREAM, statement);

*****************************************************************************

Anyone know why?

Thank you very much!

Outcomes