Enabling Debugging messages in lwip

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Enabling Debugging messages in lwip

samyuktar
Hello,

I am using a CC1352P1 board to run lwIP.

I would like to enable LWIP debug messages to try and debug some of the
problems I'm having (check my other posts). I have done the following :

#define LWIP_DEBUG : ✅
#define LWIP_DEBUG_TYPES LWIP_DEBUG ✅

in lwipopts.h:

#if 1
#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"
extern void UARTprintf(const char *pcString, ...);
/* added by QJ Wang*/
#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)
/* end by */
#define LWIP_DEBUG 1
#endif


I am sending print statements to the PC using a system_printf native to the
TI-RTOS. As is I am unable to see any of the lwIP debug messages when I run
"screen /dev/tty.usbmodem:<deviceID> 115200" in a terminal. Please advise.






--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

ODP: Enabling Debugging messages in lwip

mtimm
Hi,

Do you use any RTOS?





Od:        "samyuktar" <[hidden email]>
Do:        [hidden email]
Data:        31.12.2019 01:30
Temat:        [lwip-users] Enabling Debugging messages in lwip
Wysłane przez:        "lwip-users" <lwip-users-bounces+m.timm=[hidden email]>




Hello,

I am using a CC1352P1 board to run lwIP.

I would like to enable LWIP debug messages to try and debug some of the
problems I'm having (check my other posts). I have done the following :

#define LWIP_DEBUG : ✅
#define LWIP_DEBUG_TYPES LWIP_DEBUG ✅

in lwipopts.h:

#if 1
#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"
extern void UARTprintf(const char *pcString, ...);
/* added by QJ Wang*/
#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)
/* end by */
#define LWIP_DEBUG 1
#endif


I am sending print statements to the PC using a system_printf native to the
TI-RTOS. As is I am unable to see any of the lwIP debug messages when I run
"screen /dev/tty.usbmodem:<deviceID> 115200" in a terminal. Please advise.






--
Sent from:
http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users



WB Electronics S.A.
05-850 Ozarow Mazowiecki, ul. Poznanska 129/133
NIP: 526-216-83-87 REGON: 0128903491
KRS: 0000369722 W.K.Z.: 504 921,65 PLN
Sad Rejonowy dla m. st. WARSZAWY w Warszawie XIV Wydzial Gospodarczy Krajowego Rejestru Sadowego

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Enabling Debugging messages in lwip

mtimm
In reply to this post by samyuktar
Ok, I see now, TI-RTOS.

When I used FreeRTOS (project generated by TI HalCoGen) the solution was to
add printf support in compiler options (Project properties -> CCS Build ->
ARM Compiler -> --printf_support=minimal). Using RTOS, this option was
disabled by default.
Unfortunely, in my case only 'minimal' option could be turned on. It is
limited to text. [You can read about details in your Compiler Technical Ref
Manual]. Now I can use printf but debugging LwIP is limited to letters/text
(it is impossible to make number conversion).



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Enabling Debugging messages in lwip

samyuktar
Hi,

I added the --printf_support=full and changed the LWIP_PLATFORM_DEBUG to
printf instead of UARTprintf of System_printf .. I am still not getting any
print statements.

I want also to confirm that I am using the correct method to see these
messages. I am currently using a display handle and using Display.h, opening
the display_handle and using Display_printf to print messages on the PC. I
am not sure if the messages are being printed but to another UART module or
something ...





--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Enabling Debugging messages in lwip

Stephen Cowell

On 12/31/2019 10:46 AM, samyuktar wrote:

> Hi,
>
> I added the --printf_support=full and changed the LWIP_PLATFORM_DEBUG to
> printf instead of UARTprintf of System_printf .. I am still not getting any
> print statements.
>
> I want also to confirm that I am using the correct method to see these
> messages. I am currently using a display handle and using Display.h, opening
> the display_handle and using Display_printf to print messages on the PC. I
> am not sure if the messages are being printed but to another UART module or
> something ...

If you get printf() working with your normal code you'll be there... can
you printf() outside of lwip?  Divide and conquer!
__
Steve
.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Enabling Debugging messages in lwip

mtimm
As Steve said, try printf e.g. as first function inside your main().

If it is not working try --printf_support=minimal. In my FreeRTOS project
only minimal option works.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users