lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Re: LWIP_DEBUG in the ethernet_input function


From: Martin Velek
Subject: [lwip-devel] Re: LWIP_DEBUG in the ethernet_input function
Date: Wed, 26 Aug 2009 09:02:25 +0200

Hi,

I am using usprintf from stellaris luminary package. It is a simple
replacement of sprintf with only %c, %d, %p, %s, %u, %x, and %X
formatting characters and support for zero filling & number of digits.

So %2hx, %hhx gives me error because %h is unsupported. My cc.h definitions are:
#define U8_F "c"
#define S8_F "c"
#define X8_F "x"
#define U16_F "u"
#define S16_F "d"
#define X16_F "x"
#define U32_F "u"
#define S32_F "d"
#define X32_F "x"

Question is why are not used macros in function ethernet_input but in
all other places are.

Martin

>Can you confirm which bit your sprintf has problems with.  Your
>suggestion above makes me think it can't cope with %x whereas before I
>was assuming it was the variable width formatter (%02) that it was
>struggling with.

>Have you tried using %hhx instead of %02x?

2009/8/25 Martin Velek <address@hidden>:
> Hi Kieran,
>
> U8_F and S8_F was only an example. The correct implementation would be
>  LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE,
>    ("ethernet_input:
> dest:%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F",
> src:%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F":%02"X8_F",
> type:%04"X16_F"\n".....
>
> I wanted to point on a bug(issue) in etharp.c function in new release
> LWIP 1.3.1. I do not know how to set it in a bugtracker on lwip pages.
>
> Martin
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]