Issues with lwIP and debugging
Hello,
I need your help. I've got some troubles with lwIP and to find a solution for that I want to enable debugging in lwIP.
I'm working with a STM3210C-EVAL board and with CubeMX. lwIP is working, I can send a ping and also see the webpage in fsdata. But now I want to enable debugging. I also configured UART2 with CubeMX and can send messages via HAL_UART_Transmit(). Then I redirect printf, so that messages are send via UART. This also workes fine. For this I added this lines to my main.c:
#ifdef __GNUC__
/* With GCC, small printf (option LD Linker->Libraries->Small printf set to 'Yes') calls __io_putchar() */#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)#else#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)#endif /* __GNUC__ */And after the main function:
PUTCHAR_PROTOTYPE {
HAL_UART_Transmit(&huart2, (uint8_t *)&ch, 1, 0xFFFF); return ch;}And now I wanted to enable the debugging in lwIP. For this, I added the lines below in lwipopts.h:
#define LWIP_DEBUG 1
#define ICMP_DEBUG LWIP_DBG_ON
But there are no messages send when I ping or open the webserver. I tried another options, like IP_DEBUG or TCP_DEBUG, but there is no difference.
Have anyone an idea where my mistake is?
Thank you