BarryP wrote:Brilliant !! Thanks .
Got it working in eclipse .. Ye Ha !
Here is my modified Makefile .Code: Select allXTENSA_TOOLS_ROOT ?= c:/Espressif/xtensa-lx106-elf/bin
SDK_BASE ?= c:/Espressif/ESP8266_SDK
SDK_INCDIR = include
# I use a separate DIR for the includes that are not part of the official SDK
USER_INC_BASE ?= C:/Espressif/ThirdParty/include
CC := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
AR := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
OBJCOPY := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objcopy
SDK_LIB_DIR ?= $(SDK_BASE)/lib
SDK_INCDIR := $(addprefix -I$(SDK_BASE)/,$(SDK_INCDIR))
# The dir structuredoesn't play nice with eclipse so added -Isrc/include/ipv4/
CFLAGS = -Os -mlongcalls -Isrc/include/ipv4/ -Isrc/include/ -Iconfig/ -Iespressif/include/
CFLAGS += -DLWIP_OPEN_SRC
CFLAGS += -D__ets__
OBJS = \
src/api/api_lib.o \
src/api/api_msg.o \
src/api/err.o \
src/api/netbuf.o \
src/api/netdb.o \
src/api/netifapi.o \
src/api/sockets.o \
src/api/tcpip.o \
src/core/ipv4/autoip.o \
src/core/ipv4/icmp.o \
src/core/ipv4/igmp.o \
src/core/ipv4/inet.o \
src/core/ipv4/inet_chksum.o \
src/core/ipv4/ip.o \
src/core/ipv4/ip_addr.o \
src/core/ipv4/ip_frag.o \
src/core/dhcp.o \
src/core/dns.o \
src/core/def.o \
src/core/init.o \
src/core/netif.o \
src/core/mem.o \
src/core/memp.o \
src/core/pbuf.o \
src/core/raw.o \
src/core/stats.o \
src/core/sys.o \
src/core/tcp.o \
src/core/tcp_in.o \
src/core/tcp_out.o \
src/core/timers.o \
src/core/udp.o \
src/netif/etharp.o \
espressif/espconn.o \
espressif/espconn_tcp.o \
espressif/espconn_udp.o \
espressif/sys_arch.o \
espressif/netio.o \
espressif/dhcpserver.o \
espressif/ping.o \
.PHONY: all remove_user_includes copy_liblwip_to_sdk_lib_dir make_user_inc_dirs copy_includes_to_user_inc_dir
%.o: %.c
$(CC) -c $(SDK_INCDIR) $(CFLAGS) -o $@ $<
$(OBJCOPY) --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal $@
all: liblwip.a copy_liblwip_to_sdk_lib_dir
liblwip.a: $(OBJS)
$(AR) rcs liblwip.a $(OBJS)
copy_liblwip_to_sdk_lib_dir:
cp liblwip.a $(SDK_LIB_DIR)
make_user_inc_dirs:
-mkdir $(USER_INC_BASE)/pp
-mkdir $(USER_INC_BASE)/netif
-mkdir $(USER_INC_BASE)/arch
-mkdir $(USER_INC_BASE)/lwip
-mkdir $(USER_INC_BASE)/lwip/app
copy_includes_to_user_inc_dir: make_user_inc_dirs
cp ./src/include/ipv4/lwip/*.* $(USER_INC_BASE)/lwip/
cp ./src/include/lwip/*.* $(USER_INC_BASE)/lwip/
cp ./espressif/include/lwip/app/*.* $(USER_INC_BASE)/lwip/app/
cp ./src/include/netif/*.* $(USER_INC_BASE)/netif/
cp ./espressif/include/arch/*.* $(USER_INC_BASE)/arch/
cp ./espressif/include/pp/*.* $(USER_INC_BASE)/pp/
#-Isrc/include/ -Iconfig/ -Iespressif/include/
remove_user_includes:
rm -rf $(USER_INC_BASE)/pp
rm -rf $(USER_INC_BASE)/netif
rm -rf $(USER_INC_BASE)/arch
rm -rf $(USER_INC_BASE)/lwip/app
rm -rf $(USER_INC_BASE)/lwip
clean:
rm $(OBJS) liblwip.a
Lets get the party started and +1
[url=https://www.banggood.com/custlink/KvGGhGF4wG[/url]
I like ESP8266 and ESP8285 and ESP32