Skip to content

Commit

Permalink
Fix debug settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Mar 22, 2021
1 parent 70235bc commit bcf0ba7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 2 additions & 0 deletions mos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ conds:
TCP_WND: 2920
MEMP_NUM_TCP_PCB: 20
LWIP_DNS_NO_CLIENT: 1
# LWIP_DEBUG: 1
# DHCP_DEBUG: LWIP_DBG_ON

# TODO(rojer): When mos supports more elaborate conds, this can be deduped.
- when: mos.platform == "stm32"
Expand Down
11 changes: 4 additions & 7 deletions src/esp8266/sdk_lwip/include/arch/cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#ifndef __ARCH_CC_H__
#define __ARCH_CC_H__

//#include <string.h>
#include "c_types.h"
#include "ets_sys.h"
#include "osapi.h"
Expand All @@ -61,9 +60,9 @@ typedef unsigned long mem_ptr_t;
#define U16_F "d"
#define X16_F "x"

#define S32_F "d"
#define U32_F "d"
#define X32_F "x"
#define S32_F "ld"
#define U32_F "lu"
#define X32_F "lx"

#define LWIP_ERR_T s32_t

Expand All @@ -73,11 +72,9 @@ typedef unsigned long mem_ptr_t;
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END

//#define LWIP_DEBUG

#ifdef LWIP_DEBUG
#define LWIP_PLATFORM_DIAG(x) os_printf x
#define LWIP_PLATFORM_ASSERT(x) ETS_ASSERT(x)
#define LWIP_PLATFORM_ASSERT(x) os_printf("%s\n", x)
#else
#define LWIP_PLATFORM_DIAG(x)
#define LWIP_PLATFORM_ASSERT(x)
Expand Down
2 changes: 1 addition & 1 deletion src/esp8266/sdk_lwip/include/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,7 @@
* debug messages of certain types.
*/
#ifndef LWIP_DBG_TYPES_ON
#define LWIP_DBG_TYPES_ON LWIP_DBG_OFF
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion src/esp8266/sdk_lwip/src/core/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
ret = ip_output_if(p, ip_current_dest_addr(), IP_HDRINCL,
ICMP_TTL, 0, IP_PROTO_ICMP, inp);
if (ret != ERR_OK) {
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %c.\n", ret));
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %d.\n", (int) ret));
}
}
break;
Expand Down

0 comments on commit bcf0ba7

Please sign in to comment.