Skip to content

Commit 84512ec

Browse files
committed
fixes for SDK update
- recompile liblwip_gcc.a with new err_t definitions - update espconn.h (function signature change, new function) - add option to build lwip with debug-prefix-map
1 parent 1c8bcf6 commit 84512ec

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

tools/sdk/lib/liblwip_gcc.a

-89.1 KB
Binary file not shown.

tools/sdk/lwip/include/lwip/app/espconn.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ extern sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *o
573573
* - ESPCONN_ARG: dns client not initialized or invalid hostname
574574
*******************************************************************************/
575575

576-
extern sint8 espconn_gethostbyname(struct espconn *pespconn, const char *name, ip_addr_t *addr, dns_found_callback found);
576+
extern err_t espconn_gethostbyname(struct espconn *pespconn, const char *name, ip_addr_t *addr, dns_found_callback found);
577577

578578
/******************************************************************************
579579
* FunctionName : espconn_igmp_join
@@ -674,5 +674,13 @@ extern void espconn_mdns_enable(void);
674674
* Returns : none
675675
*******************************************************************************/
676676
extern void espconn_dns_setserver(u8_t numdns, ip_addr_t *dnsserver);
677+
/******************************************************************************
678+
* FunctionName : espconn_dns_getserver
679+
* Description : get dns server.
680+
* Parameters : numdns -- the index of the DNS server ,must
681+
* be < DNS_MAX_SERVERS = 2
682+
* Returns : dnsserver -- struct ip_addr_t
683+
*******************************************************************************/
684+
extern ip_addr_t espconn_dns_getserver(u8_t numdns);
677685
#endif
678686

tools/sdk/lwip/src/Makefile

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
TOOLS_PATH ?= ../../../xtensa-lx106-elf/bin/xtensa-lx106-elf-
1+
TOOLCHAIN_DIR ?= ../../../xtensa-lx106-elf
2+
TOOLS_PATH ?= $(TOOLCHAIN_DIR)/bin/xtensa-lx106-elf-
23
LWIP_LIB ?= liblwip_src.a
34
SDK_PATH ?= $(abspath ../../)
45

@@ -9,6 +10,10 @@ LWIP_INCLUDE = -Ibuild -I$(SDK_PATH)/include -I$(SDK_PATH)/lwip/include
910
BUILD_FLAGS = -c -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections
1011
BUILD_DEFINES = -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -DLWIP_OPEN_SRC
1112

13+
ifdef WITH_DEBUG_PREFIX_MAP
14+
EXTRA_FLAGS = -fdebug-prefix-map=$(PWD)= -fdebug-prefix-map=$(TOOLCHAIN_DIR)=xtensa-lx106-elf -gno-record-gcc-switches
15+
endif
16+
1217
CC=$(TOOLS_PATH)gcc
1318
AR=$(TOOLS_PATH)ar
1419

@@ -18,7 +23,7 @@ $(BUILD_PATH)/%.h:
1823

1924
$(BUILD_PATH)/%.o: %.c
2025
@mkdir -p $(dir $@)
21-
$(CC) $(BUILD_FLAGS) $(BUILD_DEFINES) $(LWIP_INCLUDE) $< -o $@
26+
$(CC) $(BUILD_FLAGS) $(BUILD_DEFINES) $(LWIP_INCLUDE) $(EXTRA_FLAGS) $< -o $@
2227

2328
$(LWIP_LIB): $(BUILD_PATH)/user_config.h $(LWIP_SRCS)
2429
$(AR) cru $(LWIP_LIB) $(LWIP_SRCS)

0 commit comments

Comments
 (0)