|
From: | Alexandre Malo |
Subject: | [lwip-users] using LWIP_DEBUG |
Date: | Wed, 27 May 2009 15:42:20 -0400 |
Hello,
I am working with LWIP to use the SNMP
Agent. And to understand more of whats going on with everything, I would really
like to enable Debugging message.
I tried the following:
When I put: #define LWIP_DEBUG
I get near a thousand errors when
compiling.
Here is the first few errors I get.
>>Error : argument expected while
expanding macro 'LWIP_PLATFORM_DIAG' (got 1, wanted >=2)
>>tcpip.c line 122 IAG( ("tcpip: ip_reass_tmr()\n")); if ((0x00U) & LWIP_DBG_HALT) { while(1); } } } while(0) >>
>>Error : undefined identifier
'LWIP_DBG_HALT'
>>tcpip.c line 122 ")); if ((0x00U) & LWIP_DBG_HALT) { while(1); } } } while(0) >>
>>Error : undefined identifier
'IP_TMR_INTERVAL'
>>tcpip.c line 124 sys_timeout(IP_TMR_INTERVAL, ip_reass_timer, NULL); >>
>>Error : undefined identifier
'NULL'
>>tcpip.c line 258 if (tcpip_init_done != NULL) { >>
>>Error : undefined identifier
'TCPIP_DEBUG'
>>tcpip.c line 274 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); >>
>>Error : undefined identifier
'TCPIP_DEBUG'
>>tcpip.c line 293 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg)); ----------------------------------------------------------------------
define of LWIP_DEBUGF
#ifdef LWIP_DEBUG
/** print debug message only if debug message type is enabled... * AND is of correct type AND is at least LWIP_DBG_LEVEL */ #define LWIP_DEBUGF(debug,x) do { \ if ( \ ((debug) & LWIP_DBG_ON) && \ ((debug) & LWIP_DBG_TYPES_ON) && \ ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { \ LWIP_PLATFORM_DIAG(x); \ if ((debug) & LWIP_DBG_HALT) { \ while(1); \ } \ } \ } while(0) #else /* LWIP_DEBUG */
#define LWIP_DEBUGF(debug,x) ----------------------------------------------------------------------
define of LWIP_PLATFORM_DIAG
#define LWIP_PLATFORM_DIAG( x, ... ) do{ sys_debug(x);} while( 0 );
----------------------------------------------------------------------
Thanks
Alexandre Malo
|
[Prev in Thread] | Current Thread | [Next in Thread] |