Skip to content

Commit

Permalink
LwIP: Update to STABLE 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Jul 12, 2024
1 parent aac5de9 commit d84d863
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
33 changes: 7 additions & 26 deletions examples/lwip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ LIBCOAP_API_VERSION = $(shell if [ -f $(libcoap_dir)/configure.ac ]; then \

coap_include_dir = $(libcoap_dir)/include/coap$(LIBCOAP_API_VERSION)

WITH_LWIP_BRANCH=STABLE-2_1_3_RELEASE
WITH_LWIP_CONTRIB_BRANCH=STABLE-2_1_0_RELEASE
WITH_LWIP_BRANCH=STABLE-2_2_0_RELEASE
# Update to latest TinyDTLS submodule as defined for libcoap
WITH_TINYDTLS_BRANCH=4a6a78236043da7f8af9ad7be8488aeed6884eda

Expand All @@ -29,7 +28,6 @@ LDLIBS := $(shell if [ -f $(libcoap_dir)/config.log ] ; then \
# some of the built objects.
#
all: lwip \
lwip-contrib \
check-version \
check-tinydtls \
$(coap_include_dir)/coap.h \
Expand All @@ -47,11 +45,6 @@ lwip:
(cd lwip ; git checkout $(WITH_LWIP_BRANCH))
$(MAKE)

lwip-contrib:
git clone --depth 1 https://git.savannah.nongnu.org/git/lwip/lwip-contrib.git -b $(WITH_LWIP_CONTRIB_BRANCH)
(cd lwip-contrib ; git checkout $(WITH_LWIP_CONTRIB_BRANCH))
$(MAKE)

check-version:
@(if [ -d lwip ] ; then \
cd lwip ; \
Expand All @@ -65,18 +58,6 @@ check-version:
fi ; \
fi ; \
fi)
@(if [ -d lwip-contrib ] ; then \
cd lwip-contrib ; \
TAG=`git describe --tags`; \
if [ "$$TAG" != ${WITH_LWIP_CONTRIB_BRANCH} ] ; then \
if [ "$$TAG" != "tags/${WITH_LWIP_CONTRIB_BRANCH}" ] ; then \
echo "Updating lwip-contib to ${WITH_LWIP_CONTRIB_BRANCH}" ; \
cd .. ; \
rm -rf lwip-contrib ; \
${MAKE}; \
fi ; \
fi ; \
fi)

# base libcoap git has empty ext/tinydtls
check-tinydtls:
Expand Down Expand Up @@ -114,21 +95,21 @@ check-tinydtls:
${MAKE} ; \
fi)

# lwip and coap opts (include early to shadow the lwip-contrib/ports/unix/proj/minimal/ file and any ../../config.h)
# lwip and coap opts (include early to shadow the lwip/contrib/ports/unix/proj/minimal/ file and any ../../config.h)
CFLAGS += -DWITH_LWIP -iquote./config $(EXTRA_CFLAGS)

# lwip library

CFLAGS += -Ilwip/src/include/ -Ilwip/src/include/ipv4/ \
-Ilwip-contrib/ports/unix/port/include/ \
-Ilwip-contrib/ports/unix/proj/minimal/
-Ilwip/contrib/ports/unix/port/include/ \
-Ilwip/contrib/ports/unix/proj/minimal/

LWIP_SRC = def.c init.c tapif.c etharp.c netif.c timeouts.c stats.c udp.c \
tcp.c pbuf.c ip4_addr.c ip4.c inet_chksum.c tcp_in.c tcp_out.c \
icmp.c raw.c ip4_frag.c sys_arch.c ethernet.c ip.c mem.c memp.c tcpip.c
vpath %.c lwip/src/core/ lwip-contrib/ports/unix/proj/minimal/ \
lwip/src/netif/ lwip/src/core/ipv4/ lwip-contrib/ports/unix/port/ \
lwip-contrib/ports/unix/port/netif/ lwip/src/api/
vpath %.c lwip/src/core/ lwip/contrib/ports/unix/proj/minimal/ \
lwip/src/netif/ lwip/src/core/ipv4/ lwip/contrib/ports/unix/port/ \
lwip/contrib/ports/unix/port/netif/ lwip/src/api/
# CFLAGS += -DLWIP_UNIX_LINUX

# if ipv6 is used
Expand Down
4 changes: 0 additions & 4 deletions examples/lwip/config/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
/* Set to 1 if TCP support is required */
#define LWIP_TCP 0

#ifndef LWIP_RAND
#define LWIP_RAND() ((u32_t)rand())
#endif

#ifndef netif_get_index
#define netif_get_index(netif) ((u8_t)((netif)->num + 1))
#endif
Expand Down

0 comments on commit d84d863

Please sign in to comment.