Seems we didn't fully test the LWIP debug engine after writing the vendor supplied message return strings in:
TivaWare_C_Series-2.1.0.12573. The platform Diag/Assert error strings on first check appear to be merged into the ASSERT (msg) string. Later checking finds (stats.c) is preformatting the UART print STAT strings with NL/TAB.
1 - CCS compiler generates 100's of parsing warnings (unrecognized character escape sequence) when the UART print message strings are placed in (lwipopts.h) versus moving them to (cc.h). LWIP suggests the vendor should handle debug messages in (lwipopts.h) and they did.
2 - CCS compiler warns of incompatible UART print message redefines ever LWIP Debug is enabled, that is unless the parent (#indef) are first commented out in (cc.h).
3 - When the LWIP Debug UART print message defines are moved from (lwipopts.h) into (cc.h) CCS compiler warnings are less than 5.
4 - When LWIP hardware debug NETIF/TCP/UDP etc.. are enabled they seem to invoke only after 100's of compiler warnings are in the mix and incompatible (msg) defines exist. Otherwise it seems to be pure luck LWIP debug UART prints TCP stack protocol messages at all.
Below attempt to correct the missing NET_IF message string UART prints of the DEBUGF messages. Appears the event error message was omitted in the LWIP_PLATFORM_DIAG (msg) string. The TCP stack protocol debug messages are not printing second example below.
The LWIP_STATS print out most often yet end of the message string is always mangled leaving out the information that caused the DEBUGF error. Needless to say it is impossible to fully debug EMAC/PHY issues if the Vendor debug engine is broken.
May benefit all if we work together to make the LWIP_STATS messages actually report the entire message string. Please post any fixes in this area of the vendor debug message print.
9.21.2015 **** Remove the ( \ ) after %s in UARTprintf will stop 100's of compiler warnings.
//***************************************************************************** // // ---------- Debugging options ---------- // //***************************************************************************** #ifdef DEBUG #define U8_F "c" #define S8_F "c" #define X8_F "02x" #define U16_F "u" #define S16_F "d" #define X16_F "x" #define U32_F "u" #define S32_F "d" #define X32_F "x" extern void UARTprintf(const char *pcString, ...); #define LWIP_PLATFORM_DIAG(msg) UARTprintf msg #define LWIP_PLATFORM_ASSERT(msg) \ UARTprintf("ASSERT_FAIL at line %d of %s:\ %s\n", __LINE__, __FILE__, msg) #define LWIP_DEBUG 1 #endif #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL //#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF //Compatability //#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_WARNING //#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_SERIOUS //#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_SEVERE //#define LWIP_DBG_TYPES_ON LWIP_DBG_ON #define LWIP_DBG_TYPES_ON (LWIP_DBG_ON, LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH) //#define ETHARP_DEBUG LWIP_DBG_OFF // default is OFF #define NETIF_DEBUG LWIP_DBG_ON
Seems (UDP_DEBUG == On) has to be enabled order for the other protocol debugs to print messages & work.
tcp_slowtmr: no active pcbs << requests.c; SyncWithExosite(): Exosite_Write-Request >> udp_connect: connected to 0.0.0.0,port 49153 udp_send udp_send: added header in given pbuf 2000004c udp_send: sending datagram of length 40 udp_send: UDP packet length 40 udp_send: UDP checksum 0xb781 udp_send: ip_output_if (,,,,IP_PROTO_UDP,) ip_output_if: ti0 IP header: +-------------------------------+ | 4 | 5 | 0x00 | 60 | (v, hl, tos, len) +-------------------------------+ | 2 |000| 0 | (id, flags, offset) +-------------------------------+ | 255 | 17 | 0x0000 | (ttl, proto, chksum) +-------------------------------+ | 10 | 1 | 10 | 21 | (src) +-------------------------------+ | 209 | 18 | 47 | 61 | (dest) +-------------------------------+ netif->output()udp_connect: connected to 0.0.0.0,port 49153 udp_send udp_send: added header in given pbuf 2000004c udp_send: sending datagram of length 40 udp_send: UDP packet length 40 udp_send: UDP checksum 0xb781 udp_send: ip_output_if (,,,,IP_PROTO_UDP,) ip_output_if: ti0 IP header: