310 changed files with 132313 additions and 132584 deletions
@ -1,12 +1,12 @@ |
|||
SRC_DIR := |
|||
|
|||
ifeq ($(CONFIG_RESOURCES_LWIP),y) |
|||
SRC_DIR += lwip_demo |
|||
|
|||
ifeq ($(CONFIG_USING_CONTROL_PLC_OPCUA), y) |
|||
SRC_DIR += opcua_demo |
|||
endif |
|||
|
|||
endif |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
|||
SRC_DIR := |
|||
|
|||
ifeq ($(CONFIG_RESOURCES_LWIP),y) |
|||
SRC_DIR += lwip_demo |
|||
|
|||
ifeq ($(CONFIG_USING_CONTROL_PLC_OPCUA), y) |
|||
SRC_DIR += opcua_demo |
|||
endif |
|||
|
|||
endif |
|||
|
|||
include $(KERNEL_ROOT)/compiler.mk |
|||
|
@ -1,191 +1,195 @@ |
|||
/*
|
|||
* Copyright (c) 2001-2003 Swedish Institute of Computer Science. |
|||
* All rights reserved. |
|||
* |
|||
* Redistribution and use in source and binary forms, with or without modification, |
|||
* are permitted provided that the following conditions are met: |
|||
* |
|||
* 1. Redistributions of source code must retain the above copyright notice, |
|||
* this list of conditions and the following disclaimer. |
|||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
|||
* this list of conditions and the following disclaimer in the documentation |
|||
* and/or other materials provided with the distribution. |
|||
* 3. The name of the author may not be used to endorse or promote products |
|||
* derived from this software without specific prior written permission. |
|||
* |
|||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
|||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
|||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
|||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
|||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
|||
* OF SUCH DAMAGE. |
|||
* |
|||
* This file is part of the lwIP TCP/IP stack. |
|||
* |
|||
* Author: Adam Dunkels <adam@sics.se> |
|||
* |
|||
*/ |
|||
|
|||
/*
|
|||
* Copyright (c) 2020 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
|
|||
/**
|
|||
* @file tcpecho.c |
|||
* @brief Add UDP client function |
|||
* @version 1.0 |
|||
* @author AIIT XUOS Lab |
|||
* @date 2021-05-29 |
|||
*/ |
|||
|
|||
#include "udp_echo.h" |
|||
|
|||
#include "lwip/opt.h" |
|||
|
|||
#if LWIP_SOCKET |
|||
#include <lwip/sockets.h> |
|||
|
|||
#include "lwip/sys.h" |
|||
#include "lwip/api.h" |
|||
#include <xs_ktask.h> |
|||
|
|||
#define RECV_DATA (1024) |
|||
|
|||
char* send_msg = "\n\nThis one is UDP pkg. Congratulations on you.\n\n"; |
|||
|
|||
static void UdpEchoThreadServer(void *arg) |
|||
{ |
|||
KPrintf("UdpEchoThreadServer start.\n"); |
|||
|
|||
int sock = -1; |
|||
char *recv_data; |
|||
struct sockaddr_in udp_addr,seraddr; |
|||
int recv_data_len; |
|||
socklen_t addrlen; |
|||
|
|||
while(1) |
|||
{ |
|||
recv_data = (char *)malloc(RECV_DATA); |
|||
if (recv_data == NULL) |
|||
{ |
|||
KPrintf("No memory\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
sock = socket(AF_INET, SOCK_DGRAM, 0); |
|||
if (sock < 0) |
|||
{ |
|||
KPrintf("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
udp_addr.sin_family = AF_INET; |
|||
udp_addr.sin_addr.s_addr = INADDR_ANY; |
|||
udp_addr.sin_port = htons(LOCAL_PORT_SERVER); |
|||
memset(&(udp_addr.sin_zero), 0, sizeof(udp_addr.sin_zero)); |
|||
|
|||
if (bind(sock, (struct sockaddr *)&udp_addr, sizeof(struct sockaddr)) == -1) |
|||
{ |
|||
KPrintf("Unable to bind\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
KPrintf("UDP bind sucess, start to receive.\n"); |
|||
KPrintf("\n\nLocal Port:%d\n\n", LOCAL_PORT_SERVER); |
|||
|
|||
while(1) |
|||
{ |
|||
memset(recv_data, 0, RECV_DATA); |
|||
recv_data_len=recvfrom(sock,recv_data, |
|||
RECV_DATA,0, |
|||
(struct sockaddr*)&seraddr, |
|||
&addrlen); |
|||
|
|||
KPrintf("Receive from : %s\n",inet_ntoa(seraddr.sin_addr)); |
|||
|
|||
KPrintf("Recevce data : %s\n\n",recv_data); |
|||
|
|||
sendto(sock,recv_data, |
|||
recv_data_len,0, |
|||
(struct sockaddr*)&seraddr, |
|||
addrlen); |
|||
} |
|||
|
|||
__exit: |
|||
if (sock >= 0) closesocket(sock); |
|||
if (recv_data) free(recv_data); |
|||
} |
|||
} |
|||
|
|||
static void UdpEchoThreadClient(void *arg) |
|||
{ |
|||
KPrintf("UdpEchoThreadClient start.\n"); |
|||
|
|||
int sock_udp_send_once = -1; |
|||
sock_udp_send_once = socket(AF_INET, SOCK_DGRAM, 0); |
|||
if (sock_udp_send_once < 0) |
|||
{ |
|||
KPrintf("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
struct sockaddr_in udp_sock; |
|||
udp_sock.sin_family = AF_INET; |
|||
udp_sock.sin_port = htons(TARGET_PORT_CLIENT); |
|||
udp_sock.sin_addr.s_addr = PP_HTONL(LWIP_MAKEU32(IP_ADDR0_SERVER,IP_ADDR1_SERVER,IP_ADDR2_SERVER,IP_ADDR3_SERVER)); |
|||
memset(&(udp_sock.sin_zero), 0, sizeof(udp_sock.sin_zero)); |
|||
|
|||
if (connect(sock_udp_send_once, (struct sockaddr *)&udp_sock, sizeof(struct sockaddr))) |
|||
{ |
|||
KPrintf("Unable to connect\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
KPrintf("UDP connect sucess, start to send.\n"); |
|||
KPrintf("\n\nTarget Port:%d\n\n", udp_sock.sin_port); |
|||
|
|||
|
|||
|
|||
while (1) |
|||
{ |
|||
KPrintf("Lwip client is running.\n"); |
|||
|
|||
sendto(sock_udp_send_once,send_msg, |
|||
strlen(send_msg),0, |
|||
(struct sockaddr*)&udp_sock, |
|||
sizeof(struct sockaddr)); |
|||
|
|||
KPrintf("Send UDP msg: %s ", send_msg); |
|||
|
|||
MdelayKTask(1000); |
|||
} |
|||
|
|||
__exit: |
|||
if (sock_udp_send_once >= 0) closesocket(sock_udp_send_once); |
|||
|
|||
return; |
|||
} |
|||
|
|||
void |
|||
UdpEchoInit(void) |
|||
{ |
|||
#ifdef SET_AS_SERVER |
|||
sys_thread_new("UdpEchoThreadServer", UdpEchoThreadServer, NULL, 2048, 4); |
|||
#else |
|||
sys_thread_new("UdpEchoThreadClient", UdpEchoThreadClient, NULL, 2048, 4); |
|||
#endif |
|||
} |
|||
|
|||
#endif /* LWIP_NETCONN */ |
|||
/*
|
|||
* Copyright (c) 2001-2003 Swedish Institute of Computer Science. |
|||
* All rights reserved. |
|||
* |
|||
* Redistribution and use in source and binary forms, with or without modification, |
|||
* are permitted provided that the following conditions are met: |
|||
* |
|||
* 1. Redistributions of source code must retain the above copyright notice, |
|||
* this list of conditions and the following disclaimer. |
|||
* 2. Redistributions in binary form must reproduce the above copyright notice, |
|||
* this list of conditions and the following disclaimer in the documentation |
|||
* and/or other materials provided with the distribution. |
|||
* 3. The name of the author may not be used to endorse or promote products |
|||
* derived from this software without specific prior written permission. |
|||
* |
|||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
|||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
|||
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
|||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
|||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
|||
* OF SUCH DAMAGE. |
|||
* |
|||
* This file is part of the lwIP TCP/IP stack. |
|||
* |
|||
* Author: Adam Dunkels <adam@sics.se> |
|||
* |
|||
*/ |
|||
|
|||
/*
|
|||
* Copyright (c) 2020 AIIT XUOS Lab |
|||
* XiUOS is licensed under Mulan PSL v2. |
|||
* You can use this software according to the terms and conditions of the Mulan PSL v2. |
|||
* You may obtain a copy of Mulan PSL v2 at: |
|||
* http://license.coscl.org.cn/MulanPSL2
|
|||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, |
|||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, |
|||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. |
|||
* See the Mulan PSL v2 for more details. |
|||
*/ |
|||
|
|||
/**
|
|||
* @file tcpecho.c |
|||
* @brief Add UDP client function |
|||
* @version 1.0 |
|||
* @author AIIT XUOS Lab |
|||
* @date 2021-05-29 |
|||
*/ |
|||
|
|||
#include "udp_echo.h" |
|||
|
|||
#include "lwip/opt.h" |
|||
|
|||
#if LWIP_SOCKET |
|||
#include <lwip/sockets.h> |
|||
|
|||
#include "lwip/sys.h" |
|||
#include "lwip/api.h" |
|||
#include <xs_ktask.h> |
|||
|
|||
#ifdef BOARD_CORTEX_M7_EVB |
|||
#define LWIP_UDP_TASK_STACK 4096 |
|||
#else |
|||
#define LWIP_UDP_TASK_STACK 2048 |
|||
#endif |
|||
|
|||
#define RECV_DATA (1024) |
|||
|
|||
char* send_msg = "\n\nThis one is UDP pkg. Congratulations on you.\n\n"; |
|||
|
|||
static void UdpEchoThreadServer(void *arg) |
|||
{ |
|||
KPrintf("UdpEchoThreadServer start.\n"); |
|||
|
|||
int sock = -1; |
|||
char *recv_data; |
|||
struct sockaddr_in udp_addr,seraddr; |
|||
int recv_data_len; |
|||
socklen_t addrlen; |
|||
|
|||
while(1) |
|||
{ |
|||
recv_data = (char *)malloc(RECV_DATA); |
|||
if (recv_data == NULL) |
|||
{ |
|||
KPrintf("No memory\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
sock = socket(AF_INET, SOCK_DGRAM, 0); |
|||
if (sock < 0) |
|||
{ |
|||
KPrintf("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
udp_addr.sin_family = AF_INET; |
|||
udp_addr.sin_addr.s_addr = INADDR_ANY; |
|||
udp_addr.sin_port = htons(LOCAL_PORT_SERVER); |
|||
memset(&(udp_addr.sin_zero), 0, sizeof(udp_addr.sin_zero)); |
|||
|
|||
if (bind(sock, (struct sockaddr *)&udp_addr, sizeof(struct sockaddr)) == -1) |
|||
{ |
|||
KPrintf("Unable to bind\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
KPrintf("UDP bind sucess, start to receive.\n"); |
|||
KPrintf("\n\nLocal Port:%d\n\n", LOCAL_PORT_SERVER); |
|||
|
|||
while(1) |
|||
{ |
|||
memset(recv_data, 0, RECV_DATA); |
|||
recv_data_len=recvfrom(sock,recv_data, |
|||
RECV_DATA,0, |
|||
(struct sockaddr*)&seraddr, |
|||
&addrlen); |
|||
|
|||
KPrintf("Receive from : %s\n",inet_ntoa(seraddr.sin_addr)); |
|||
|
|||
KPrintf("Recevce data : %s\n\n",recv_data); |
|||
|
|||
sendto(sock,recv_data, |
|||
recv_data_len,0, |
|||
(struct sockaddr*)&seraddr, |
|||
addrlen); |
|||
} |
|||
|
|||
__exit: |
|||
if (sock >= 0) closesocket(sock); |
|||
if (recv_data) free(recv_data); |
|||
} |
|||
} |
|||
|
|||
static void UdpEchoThreadClient(void *arg) |
|||
{ |
|||
KPrintf("UdpEchoThreadClient start.\n"); |
|||
|
|||
int sock_udp_send_once = -1; |
|||
sock_udp_send_once = socket(AF_INET, SOCK_DGRAM, 0); |
|||
if (sock_udp_send_once < 0) |
|||
{ |
|||
KPrintf("Socket error\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
struct sockaddr_in udp_sock; |
|||
udp_sock.sin_family = AF_INET; |
|||
udp_sock.sin_port = htons(TARGET_PORT_CLIENT); |
|||
udp_sock.sin_addr.s_addr = PP_HTONL(LWIP_MAKEU32(IP_ADDR0_SERVER,IP_ADDR1_SERVER,IP_ADDR2_SERVER,IP_ADDR3_SERVER)); |
|||
memset(&(udp_sock.sin_zero), 0, sizeof(udp_sock.sin_zero)); |
|||
|
|||
if (connect(sock_udp_send_once, (struct sockaddr *)&udp_sock, sizeof(struct sockaddr))) |
|||
{ |
|||
KPrintf("Unable to connect\n"); |
|||
goto __exit; |
|||
} |
|||
|
|||
KPrintf("UDP connect sucess, start to send.\n"); |
|||
KPrintf("\n\nTarget Port:%d\n\n", udp_sock.sin_port); |
|||
|
|||
while (1) |
|||
{ |
|||
KPrintf("Lwip client is running.\n"); |
|||
|
|||
sendto(sock_udp_send_once,send_msg, |
|||
strlen(send_msg),0, |
|||
(struct sockaddr*)&udp_sock, |
|||
sizeof(struct sockaddr)); |
|||
|
|||
KPrintf("Send UDP msg: %s ", send_msg); |
|||
|
|||
MdelayKTask(1000); |
|||
} |
|||
|
|||
__exit: |
|||
if (sock_udp_send_once >= 0) closesocket(sock_udp_send_once); |
|||
|
|||
return; |
|||
} |
|||
|
|||
void |
|||
UdpEchoInit(void) |
|||
{ |
|||
#ifdef SET_AS_SERVER |
|||
sys_thread_new("UdpEchoThreadServer", UdpEchoThreadServer, NULL, LWIP_UDP_TASK_STACK, 4); |
|||
#else |
|||
sys_thread_new("UdpEchoThreadClient", UdpEchoThreadClient, NULL, LWIP_UDP_TASK_STACK, 4); |
|||
#endif |
|||
} |
|||
|
|||
#endif /* LWIP_NETCONN */ |
|||
|
@ -1,15 +1,15 @@ |
|||
api/ - The code for the high-level wrapper API. Not needed if |
|||
you use the lowel-level call-back/raw API. |
|||
|
|||
apps/ - Higher layer applications that are specifically programmed |
|||
with the lwIP low-level raw API. |
|||
|
|||
core/ - The core of the TPC/IP stack; protocol implementations, |
|||
memory and buffer management, and the low-level raw API. |
|||
|
|||
include/ - lwIP include files. |
|||
|
|||
netif/ - Generic network interface device drivers are kept here. |
|||
|
|||
For more information on the various subdirectories, check the FILES |
|||
file in each directory. |
|||
api/ - The code for the high-level wrapper API. Not needed if |
|||
you use the lowel-level call-back/raw API. |
|||
|
|||
apps/ - Higher layer applications that are specifically programmed |
|||
with the lwIP low-level raw API. |
|||
|
|||
core/ - The core of the TPC/IP stack; protocol implementations, |
|||
memory and buffer management, and the low-level raw API. |
|||
|
|||
include/ - lwIP include files. |
|||
|
|||
netif/ - Generic network interface device drivers are kept here. |
|||
|
|||
For more information on the various subdirectories, check the FILES |
|||
file in each directory. |
|||
|
@ -1,279 +1,279 @@ |
|||
# This file is indended to be included in end-user CMakeLists.txt |
|||
# include(/path/to/Filelists.cmake) |
|||
# It assumes the variable LWIP_DIR is defined pointing to the |
|||
# root path of lwIP sources. |
|||
# |
|||
# This file is NOT designed (on purpose) to be used as cmake |
|||
# subdir via add_subdirectory() |
|||
# The intention is to provide greater flexibility to users to |
|||
# create their own targets using the *_SRCS variables. |
|||
|
|||
set(LWIP_VERSION_MAJOR "2") |
|||
set(LWIP_VERSION_MINOR "1") |
|||
set(LWIP_VERSION_REVISION "2") |
|||
# LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases |
|||
# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions |
|||
# Numbers 1..31 are reserved for release candidates |
|||
set(LWIP_VERSION_RC "LWIP_RC_RELEASE") |
|||
|
|||
if ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") |
|||
set(LWIP_VERSION_STRING |
|||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}" |
|||
) |
|||
elseif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_DEVELOPMENT") |
|||
set(LWIP_VERSION_STRING |
|||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.dev" |
|||
) |
|||
else ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") |
|||
set(LWIP_VERSION_STRING |
|||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.rc${LWIP_VERSION_RC}" |
|||
) |
|||
endif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") |
|||
|
|||
# The minimum set of files needed for lwIP. |
|||
set(lwipcore_SRCS |
|||
${LWIP_DIR}/src/core/init.c |
|||
${LWIP_DIR}/src/core/def.c |
|||
${LWIP_DIR}/src/core/dns.c |
|||
${LWIP_DIR}/src/core/inet_chksum.c |
|||
${LWIP_DIR}/src/core/ip.c |
|||
${LWIP_DIR}/src/core/mem.c |
|||
${LWIP_DIR}/src/core/memp.c |
|||
${LWIP_DIR}/src/core/netif.c |
|||
${LWIP_DIR}/src/core/pbuf.c |
|||
${LWIP_DIR}/src/core/raw.c |
|||
${LWIP_DIR}/src/core/stats.c |
|||
${LWIP_DIR}/src/core/sys.c |
|||
${LWIP_DIR}/src/core/altcp.c |
|||
${LWIP_DIR}/src/core/altcp_alloc.c |
|||
${LWIP_DIR}/src/core/altcp_tcp.c |
|||
${LWIP_DIR}/src/core/tcp.c |
|||
${LWIP_DIR}/src/core/tcp_in.c |
|||
${LWIP_DIR}/src/core/tcp_out.c |
|||
${LWIP_DIR}/src/core/timeouts.c |
|||
${LWIP_DIR}/src/core/udp.c |
|||
) |
|||
set(lwipcore4_SRCS |
|||
${LWIP_DIR}/src/core/ipv4/autoip.c |
|||
${LWIP_DIR}/src/core/ipv4/dhcp.c |
|||
${LWIP_DIR}/src/core/ipv4/etharp.c |
|||
${LWIP_DIR}/src/core/ipv4/icmp.c |
|||
${LWIP_DIR}/src/core/ipv4/igmp.c |
|||
${LWIP_DIR}/src/core/ipv4/ip4_frag.c |
|||
${LWIP_DIR}/src/core/ipv4/ip4.c |
|||
${LWIP_DIR}/src/core/ipv4/ip4_addr.c |
|||
) |
|||
set(lwipcore6_SRCS |
|||
${LWIP_DIR}/src/core/ipv6/dhcp6.c |
|||
${LWIP_DIR}/src/core/ipv6/ethip6.c |
|||
${LWIP_DIR}/src/core/ipv6/icmp6.c |
|||
${LWIP_DIR}/src/core/ipv6/inet6.c |
|||
${LWIP_DIR}/src/core/ipv6/ip6.c |
|||
${LWIP_DIR}/src/core/ipv6/ip6_addr.c |
|||
${LWIP_DIR}/src/core/ipv6/ip6_frag.c |
|||
${LWIP_DIR}/src/core/ipv6/mld6.c |
|||
${LWIP_DIR}/src/core/ipv6/nd6.c |
|||
) |
|||
|
|||
# APIFILES: The files which implement the sequential and socket APIs. |
|||
set(lwipapi_SRCS |
|||
${LWIP_DIR}/src/api/api_lib.c |
|||
${LWIP_DIR}/src/api/api_msg.c |
|||
${LWIP_DIR}/src/api/err.c |
|||
${LWIP_DIR}/src/api/if_api.c |
|||
${LWIP_DIR}/src/api/netbuf.c |
|||
${LWIP_DIR}/src/api/netdb.c |
|||
${LWIP_DIR}/src/api/netifapi.c |
|||
${LWIP_DIR}/src/api/sockets.c |
|||
${LWIP_DIR}/src/api/tcpip.c |
|||
) |
|||
|
|||
# Files implementing various generic network interface functions |
|||
set(lwipnetif_SRCS |
|||
${LWIP_DIR}/src/netif/ethernet.c |
|||
${LWIP_DIR}/src/netif/bridgeif.c |
|||
${LWIP_DIR}/src/netif/bridgeif_fdb.c |
|||
${LWIP_DIR}/src/netif/slipif.c |
|||
) |
|||
|
|||
# 6LoWPAN |
|||
set(lwipsixlowpan_SRCS |
|||
${LWIP_DIR}/src/netif/lowpan6_common.c |
|||
${LWIP_DIR}/src/netif/lowpan6.c |
|||
${LWIP_DIR}/src/netif/lowpan6_ble.c |
|||
${LWIP_DIR}/src/netif/zepif.c |
|||
) |
|||
|
|||
# PPP |
|||
set(lwipppp_SRCS |
|||
${LWIP_DIR}/src/netif/ppp/auth.c |
|||
${LWIP_DIR}/src/netif/ppp/ccp.c |
|||
${LWIP_DIR}/src/netif/ppp/chap-md5.c |
|||
${LWIP_DIR}/src/netif/ppp/chap_ms.c |
|||
${LWIP_DIR}/src/netif/ppp/chap-new.c |
|||
${LWIP_DIR}/src/netif/ppp/demand.c |
|||
${LWIP_DIR}/src/netif/ppp/eap.c |
|||
${LWIP_DIR}/src/netif/ppp/ecp.c |
|||
${LWIP_DIR}/src/netif/ppp/eui64.c |
|||
${LWIP_DIR}/src/netif/ppp/fsm.c |
|||
${LWIP_DIR}/src/netif/ppp/ipcp.c |
|||
${LWIP_DIR}/src/netif/ppp/ipv6cp.c |
|||
${LWIP_DIR}/src/netif/ppp/lcp.c |
|||
${LWIP_DIR}/src/netif/ppp/magic.c |
|||
${LWIP_DIR}/src/netif/ppp/mppe.c |
|||
${LWIP_DIR}/src/netif/ppp/multilink.c |
|||
${LWIP_DIR}/src/netif/ppp/ppp.c |
|||
${LWIP_DIR}/src/netif/ppp/pppapi.c |
|||
${LWIP_DIR}/src/netif/ppp/pppcrypt.c |
|||
${LWIP_DIR}/src/netif/ppp/pppoe.c |
|||
${LWIP_DIR}/src/netif/ppp/pppol2tp.c |
|||
${LWIP_DIR}/src/netif/ppp/pppos.c |
|||
${LWIP_DIR}/src/netif/ppp/upap.c |
|||
${LWIP_DIR}/src/netif/ppp/utils.c |
|||
${LWIP_DIR}/src/netif/ppp/vj.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/arc4.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/des.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/md4.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/md5.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/sha1.c |
|||
) |
|||
|
|||
# SNMPv3 agent |
|||
set(lwipsnmp_SRCS |
|||
${LWIP_DIR}/src/apps/snmp/snmp_asn1.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_core.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_icmp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_interfaces.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_ip.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_snmp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_system.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_tcp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_udp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_snmpv2_framework.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_snmpv2_usm.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_msg.c |
|||
${LWIP_DIR}/src/apps/snmp/snmpv3.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_netconn.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_pbuf_stream.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_raw.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_scalar.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_table.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_threadsync.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_traps.c |
|||
) |
|||
|
|||
# HTTP server + client |
|||
set(lwiphttp_SRCS |
|||
${LWIP_DIR}/src/apps/http/altcp_proxyconnect.c |
|||
${LWIP_DIR}/src/apps/http/fs.c |
|||
${LWIP_DIR}/src/apps/http/http_client.c |
|||
${LWIP_DIR}/src/apps/http/httpd.c |
|||
) |
|||
|
|||
# MAKEFSDATA HTTP server host utility |
|||
set(lwipmakefsdata_SRCS |
|||
${LWIP_DIR}/src/apps/http/makefsdata/makefsdata.c |
|||
) |
|||
|
|||
# IPERF server |
|||
set(lwipiperf_SRCS |
|||
${LWIP_DIR}/src/apps/lwiperf/lwiperf.c |
|||
) |
|||
|
|||
# SMTP client |
|||
set(lwipsmtp_SRCS |
|||
${LWIP_DIR}/src/apps/smtp/smtp.c |
|||
) |
|||
|
|||
# SNTP client |
|||
set(lwipsntp_SRCS |
|||
${LWIP_DIR}/src/apps/sntp/sntp.c |
|||
) |
|||
|
|||
# MDNS responder |
|||
set(lwipmdns_SRCS |
|||
${LWIP_DIR}/src/apps/mdns/mdns.c |
|||
) |
|||
|
|||
# NetBIOS name server |
|||
set(lwipnetbios_SRCS |
|||
${LWIP_DIR}/src/apps/netbiosns/netbiosns.c |
|||
) |
|||
|
|||
# TFTP server files |
|||
set(lwiptftp_SRCS |
|||
${LWIP_DIR}/src/apps/tftp/tftp_server.c |
|||
) |
|||
|
|||
# MQTT client files |
|||
set(lwipmqtt_SRCS |
|||
${LWIP_DIR}/src/apps/mqtt/mqtt.c |
|||
) |
|||
|
|||
# ARM MBEDTLS related files of lwIP rep |
|||
set(lwipmbedtls_SRCS |
|||
${LWIP_DIR}/src/apps/altcp_tls/altcp_tls_mbedtls.c |
|||
${LWIP_DIR}/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c |
|||
${LWIP_DIR}/src/apps/snmp/snmpv3_mbedtls.c |
|||
) |
|||
|
|||
# All LWIP files without apps |
|||
set(lwipnoapps_SRCS |
|||
${lwipcore_SRCS} |
|||
${lwipcore4_SRCS} |
|||
${lwipcore6_SRCS} |
|||
${lwipapi_SRCS} |
|||
${lwipnetif_SRCS} |
|||
${lwipsixlowpan_SRCS} |
|||
${lwipppp_SRCS} |
|||
) |
|||
|
|||
# LWIPAPPFILES: All LWIP APPs |
|||
set(lwipallapps_SRCS |
|||
${lwipsnmp_SRCS} |
|||
${lwiphttp_SRCS} |
|||
${lwipiperf_SRCS} |
|||
${lwipsmtp_SRCS} |
|||
${lwipsntp_SRCS} |
|||
${lwipmdns_SRCS} |
|||
${lwipnetbios_SRCS} |
|||
${lwiptftp_SRCS} |
|||
${lwipmqtt_SRCS} |
|||
${lwipmbedtls_SRCS} |
|||
) |
|||
|
|||
# Generate lwip/init.h (version info) |
|||
configure_file(${LWIP_DIR}/src/include/lwip/init.h.cmake.in ${LWIP_DIR}/src/include/lwip/init.h) |
|||
|
|||
# Documentation |
|||
set(DOXYGEN_DIR ${LWIP_DIR}/doc/doxygen) |
|||
set(DOXYGEN_OUTPUT_DIR output) |
|||
set(DOXYGEN_IN ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile.cmake.in) |
|||
set(DOXYGEN_OUT ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile) |
|||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT}) |
|||
|
|||
find_package(Doxygen) |
|||
if (DOXYGEN_FOUND) |
|||
message("Doxygen build started") |
|||
|
|||
add_custom_target(lwipdocs |
|||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOXYGEN_DIR}/${DOXYGEN_OUTPUT_DIR}/html |
|||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} |
|||
WORKING_DIRECTORY ${DOXYGEN_DIR} |
|||
COMMENT "Generating API documentation with Doxygen" |
|||
VERBATIM) |
|||
else (DOXYGEN_FOUND) |
|||
message("Doxygen needs to be installed to generate the doxygen documentation") |
|||
endif (DOXYGEN_FOUND) |
|||
|
|||
# lwIP libraries |
|||
add_library(lwipcore EXCLUDE_FROM_ALL ${lwipnoapps_SRCS}) |
|||
target_compile_options(lwipcore PRIVATE ${LWIP_COMPILER_FLAGS}) |
|||
target_compile_definitions(lwipcore PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) |
|||
target_include_directories(lwipcore PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS}) |
|||
|
|||
add_library(lwipallapps EXCLUDE_FROM_ALL ${lwipallapps_SRCS}) |
|||
target_compile_options(lwipallapps PRIVATE ${LWIP_COMPILER_FLAGS}) |
|||
target_compile_definitions(lwipallapps PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) |
|||
target_include_directories(lwipallapps PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS}) |
|||
# This file is indended to be included in end-user CMakeLists.txt |
|||
# include(/path/to/Filelists.cmake) |
|||
# It assumes the variable LWIP_DIR is defined pointing to the |
|||
# root path of lwIP sources. |
|||
# |
|||
# This file is NOT designed (on purpose) to be used as cmake |
|||
# subdir via add_subdirectory() |
|||
# The intention is to provide greater flexibility to users to |
|||
# create their own targets using the *_SRCS variables. |
|||
|
|||
set(LWIP_VERSION_MAJOR "2") |
|||
set(LWIP_VERSION_MINOR "1") |
|||
set(LWIP_VERSION_REVISION "2") |
|||
# LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases |
|||
# LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions |
|||
# Numbers 1..31 are reserved for release candidates |
|||
set(LWIP_VERSION_RC "LWIP_RC_RELEASE") |
|||
|
|||
if ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") |
|||
set(LWIP_VERSION_STRING |
|||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}" |
|||
) |
|||
elseif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_DEVELOPMENT") |
|||
set(LWIP_VERSION_STRING |
|||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.dev" |
|||
) |
|||
else ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") |
|||
set(LWIP_VERSION_STRING |
|||
"${LWIP_VERSION_MAJOR}.${LWIP_VERSION_MINOR}.${LWIP_VERSION_REVISION}.rc${LWIP_VERSION_RC}" |
|||
) |
|||
endif ("${LWIP_VERSION_RC}" STREQUAL "LWIP_RC_RELEASE") |
|||
|
|||
# The minimum set of files needed for lwIP. |
|||
set(lwipcore_SRCS |
|||
${LWIP_DIR}/src/core/init.c |
|||
${LWIP_DIR}/src/core/def.c |
|||
${LWIP_DIR}/src/core/dns.c |
|||
${LWIP_DIR}/src/core/inet_chksum.c |
|||
${LWIP_DIR}/src/core/ip.c |
|||
${LWIP_DIR}/src/core/mem.c |
|||
${LWIP_DIR}/src/core/memp.c |
|||
${LWIP_DIR}/src/core/netif.c |
|||
${LWIP_DIR}/src/core/pbuf.c |
|||
${LWIP_DIR}/src/core/raw.c |
|||
${LWIP_DIR}/src/core/stats.c |
|||
${LWIP_DIR}/src/core/sys.c |
|||
${LWIP_DIR}/src/core/altcp.c |
|||
${LWIP_DIR}/src/core/altcp_alloc.c |
|||
${LWIP_DIR}/src/core/altcp_tcp.c |
|||
${LWIP_DIR}/src/core/tcp.c |
|||
${LWIP_DIR}/src/core/tcp_in.c |
|||
${LWIP_DIR}/src/core/tcp_out.c |
|||
${LWIP_DIR}/src/core/timeouts.c |
|||
${LWIP_DIR}/src/core/udp.c |
|||
) |
|||
set(lwipcore4_SRCS |
|||
${LWIP_DIR}/src/core/ipv4/autoip.c |
|||
${LWIP_DIR}/src/core/ipv4/dhcp.c |
|||
${LWIP_DIR}/src/core/ipv4/etharp.c |
|||
${LWIP_DIR}/src/core/ipv4/icmp.c |
|||
${LWIP_DIR}/src/core/ipv4/igmp.c |
|||
${LWIP_DIR}/src/core/ipv4/ip4_frag.c |
|||
${LWIP_DIR}/src/core/ipv4/ip4.c |
|||
${LWIP_DIR}/src/core/ipv4/ip4_addr.c |
|||
) |
|||
set(lwipcore6_SRCS |
|||
${LWIP_DIR}/src/core/ipv6/dhcp6.c |
|||
${LWIP_DIR}/src/core/ipv6/ethip6.c |
|||
${LWIP_DIR}/src/core/ipv6/icmp6.c |
|||
${LWIP_DIR}/src/core/ipv6/inet6.c |
|||
${LWIP_DIR}/src/core/ipv6/ip6.c |
|||
${LWIP_DIR}/src/core/ipv6/ip6_addr.c |
|||
${LWIP_DIR}/src/core/ipv6/ip6_frag.c |
|||
${LWIP_DIR}/src/core/ipv6/mld6.c |
|||
${LWIP_DIR}/src/core/ipv6/nd6.c |
|||
) |
|||
|
|||
# APIFILES: The files which implement the sequential and socket APIs. |
|||
set(lwipapi_SRCS |
|||
${LWIP_DIR}/src/api/api_lib.c |
|||
${LWIP_DIR}/src/api/api_msg.c |
|||
${LWIP_DIR}/src/api/err.c |
|||
${LWIP_DIR}/src/api/if_api.c |
|||
${LWIP_DIR}/src/api/netbuf.c |
|||
${LWIP_DIR}/src/api/netdb.c |
|||
${LWIP_DIR}/src/api/netifapi.c |
|||
${LWIP_DIR}/src/api/sockets.c |
|||
${LWIP_DIR}/src/api/tcpip.c |
|||
) |
|||
|
|||
# Files implementing various generic network interface functions |
|||
set(lwipnetif_SRCS |
|||
${LWIP_DIR}/src/netif/ethernet.c |
|||
${LWIP_DIR}/src/netif/bridgeif.c |
|||
${LWIP_DIR}/src/netif/bridgeif_fdb.c |
|||
${LWIP_DIR}/src/netif/slipif.c |
|||
) |
|||
|
|||
# 6LoWPAN |
|||
set(lwipsixlowpan_SRCS |
|||
${LWIP_DIR}/src/netif/lowpan6_common.c |
|||
${LWIP_DIR}/src/netif/lowpan6.c |
|||
${LWIP_DIR}/src/netif/lowpan6_ble.c |
|||
${LWIP_DIR}/src/netif/zepif.c |
|||
) |
|||
|
|||
# PPP |
|||
set(lwipppp_SRCS |
|||
${LWIP_DIR}/src/netif/ppp/auth.c |
|||
${LWIP_DIR}/src/netif/ppp/ccp.c |
|||
${LWIP_DIR}/src/netif/ppp/chap-md5.c |
|||
${LWIP_DIR}/src/netif/ppp/chap_ms.c |
|||
${LWIP_DIR}/src/netif/ppp/chap-new.c |
|||
${LWIP_DIR}/src/netif/ppp/demand.c |
|||
${LWIP_DIR}/src/netif/ppp/eap.c |
|||
${LWIP_DIR}/src/netif/ppp/ecp.c |
|||
${LWIP_DIR}/src/netif/ppp/eui64.c |
|||
${LWIP_DIR}/src/netif/ppp/fsm.c |
|||
${LWIP_DIR}/src/netif/ppp/ipcp.c |
|||
${LWIP_DIR}/src/netif/ppp/ipv6cp.c |
|||
${LWIP_DIR}/src/netif/ppp/lcp.c |
|||
${LWIP_DIR}/src/netif/ppp/magic.c |
|||
${LWIP_DIR}/src/netif/ppp/mppe.c |
|||
${LWIP_DIR}/src/netif/ppp/multilink.c |
|||
${LWIP_DIR}/src/netif/ppp/ppp.c |
|||
${LWIP_DIR}/src/netif/ppp/pppapi.c |
|||
${LWIP_DIR}/src/netif/ppp/pppcrypt.c |
|||
${LWIP_DIR}/src/netif/ppp/pppoe.c |
|||
${LWIP_DIR}/src/netif/ppp/pppol2tp.c |
|||
${LWIP_DIR}/src/netif/ppp/pppos.c |
|||
${LWIP_DIR}/src/netif/ppp/upap.c |
|||
${LWIP_DIR}/src/netif/ppp/utils.c |
|||
${LWIP_DIR}/src/netif/ppp/vj.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/arc4.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/des.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/md4.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/md5.c |
|||
${LWIP_DIR}/src/netif/ppp/polarssl/sha1.c |
|||
) |
|||
|
|||
# SNMPv3 agent |
|||
set(lwipsnmp_SRCS |
|||
${LWIP_DIR}/src/apps/snmp/snmp_asn1.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_core.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_icmp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_interfaces.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_ip.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_snmp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_system.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_tcp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_mib2_udp.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_snmpv2_framework.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_snmpv2_usm.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_msg.c |
|||
${LWIP_DIR}/src/apps/snmp/snmpv3.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_netconn.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_pbuf_stream.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_raw.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_scalar.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_table.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_threadsync.c |
|||
${LWIP_DIR}/src/apps/snmp/snmp_traps.c |
|||
) |
|||
|
|||
# HTTP server + client |
|||
set(lwiphttp_SRCS |
|||
${LWIP_DIR}/src/apps/http/altcp_proxyconnect.c |
|||
${LWIP_DIR}/src/apps/http/fs.c |
|||
${LWIP_DIR}/src/apps/http/http_client.c |
|||
${LWIP_DIR}/src/apps/http/httpd.c |
|||
) |
|||
|
|||
# MAKEFSDATA HTTP server host utility |
|||
set(lwipmakefsdata_SRCS |
|||
${LWIP_DIR}/src/apps/http/makefsdata/makefsdata.c |
|||
) |
|||
|
|||
# IPERF server |
|||
set(lwipiperf_SRCS |
|||
${LWIP_DIR}/src/apps/lwiperf/lwiperf.c |
|||
) |
|||
|
|||
# SMTP client |
|||
set(lwipsmtp_SRCS |
|||
${LWIP_DIR}/src/apps/smtp/smtp.c |
|||
) |
|||
|
|||
# SNTP client |
|||
set(lwipsntp_SRCS |
|||
${LWIP_DIR}/src/apps/sntp/sntp.c |
|||
) |
|||
|
|||
# MDNS responder |
|||
set(lwipmdns_SRCS |
|||
${LWIP_DIR}/src/apps/mdns/mdns.c |
|||
) |
|||
|
|||
# NetBIOS name server |
|||
set(lwipnetbios_SRCS |
|||
${LWIP_DIR}/src/apps/netbiosns/netbiosns.c |
|||
) |
|||
|
|||
# TFTP server files |
|||
set(lwiptftp_SRCS |
|||
${LWIP_DIR}/src/apps/tftp/tftp_server.c |
|||
) |
|||
|
|||
# MQTT client files |
|||
set(lwipmqtt_SRCS |
|||
${LWIP_DIR}/src/apps/mqtt/mqtt.c |
|||
) |
|||
|
|||
# ARM MBEDTLS related files of lwIP rep |
|||
set(lwipmbedtls_SRCS |
|||
${LWIP_DIR}/src/apps/altcp_tls/altcp_tls_mbedtls.c |
|||
${LWIP_DIR}/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c |
|||
${LWIP_DIR}/src/apps/snmp/snmpv3_mbedtls.c |
|||
) |
|||
|
|||
# All LWIP files without apps |
|||
set(lwipnoapps_SRCS |
|||
${lwipcore_SRCS} |
|||
${lwipcore4_SRCS} |
|||
${lwipcore6_SRCS} |
|||
${lwipapi_SRCS} |
|||
${lwipnetif_SRCS} |
|||
${lwipsixlowpan_SRCS} |
|||
${lwipppp_SRCS} |
|||
) |
|||
|
|||
# LWIPAPPFILES: All LWIP APPs |
|||
set(lwipallapps_SRCS |
|||
${lwipsnmp_SRCS} |
|||
${lwiphttp_SRCS} |
|||
${lwipiperf_SRCS} |
|||
${lwipsmtp_SRCS} |
|||
${lwipsntp_SRCS} |
|||
${lwipmdns_SRCS} |
|||
${lwipnetbios_SRCS} |
|||
${lwiptftp_SRCS} |
|||
${lwipmqtt_SRCS} |
|||
${lwipmbedtls_SRCS} |
|||
) |
|||
|
|||
# Generate lwip/init.h (version info) |
|||
configure_file(${LWIP_DIR}/src/include/lwip/init.h.cmake.in ${LWIP_DIR}/src/include/lwip/init.h) |
|||
|
|||
# Documentation |
|||
set(DOXYGEN_DIR ${LWIP_DIR}/doc/doxygen) |
|||
set(DOXYGEN_OUTPUT_DIR output) |
|||
set(DOXYGEN_IN ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile.cmake.in) |
|||
set(DOXYGEN_OUT ${LWIP_DIR}/doc/doxygen/lwip.Doxyfile) |
|||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT}) |
|||
|
|||
find_package(Doxygen) |
|||
if (DOXYGEN_FOUND) |
|||
message("Doxygen build started") |
|||
|
|||
add_custom_target(lwipdocs |
|||
COMMAND |