Why isn't this macro checked? ( #if ipconfigHAS_DEBUG_PRINTF == 1 )

There are dozens of calls to FreeRTOS_debug_printf() that are not bounded by #if, even though in the comments/directions of FreeRTOSIPConfig.h, we have the following at line 84:

/* Set to 1 to print out debug messages.  If ipconfigHAS_DEBUG_PRINTF is set to
 1 then FreeRTOS_debug_printf should be defined to the function used to print
 out the debugging messages. */
#define ipconfigHAS_DEBUG_PRINTF                0

#if ipconfigHAS_DEBUG_PRINTF == 1
  #define FreeRTOS_debug_printf        xil_printf
#endif 

(My xil_printf() is not threadsafe, and causes bus exceptions when called, so I’m trying to run without the IP stack making these calls. It seems like they should all be bounded by the above-mentioned #if

When ipconfigHAS_DEBUG_PRINTF is set to 0, the application is not supposed to define FreeRTOS_debug_printf and it gets defined to nothing - FreeRTOS-Plus-TCP/source/include/FreeRTOSIPConfigDefaults.h at main · FreeRTOS/FreeRTOS-Plus-TCP · GitHub. Why do you think we need to guard all the calls to FreeRTOS_debug_printf? Are you facing any issue?

Yes. I get dozens of compile errors about FreeRTOS_debug_printf not defined. Also, it seems like the two FreeRTOS_printf and FreeRTOS_debug_printf are used interchangeably in some areas of the IP stack code.

Which places do you get those? Can you share the complete compiler output?

Literally everywhere it’s called. My FreeRTOS+TCP code version (however old it is), does not include the following:

#ifndef FreeRTOS_debug_printf
    #if ( ( ipconfigHAS_DEBUG_PRINTF == 1 ) && defined( configPRINTF ) )
        #define FreeRTOS_debug_printf( MSG )    do { configPRINTF( MSG ); } while( ipFALSE_BOOL )
    #else
        #define FreeRTOS_debug_printf( MSG )    do {} while( ipFALSE_BOOL )
    #endif
#endif

In fact, my FreeRTOSIPConfigDefaults.h file has only 1072 lines…

When you include that, does the problem go away? Is there a reason to not use the latest version?