stm32: Use global lwip build config and support building without lwip.
This commit is contained in:
parent
871954d75c
commit
78fe979d7d
@ -52,6 +52,7 @@ INC += -I$(CMSIS_DIR)/
|
|||||||
INC += -I$(TOP)/$(HAL_DIR)/Inc
|
INC += -I$(TOP)/$(HAL_DIR)/Inc
|
||||||
INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/inc
|
INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/inc
|
||||||
#INC += -I$(USBHOST_DIR)
|
#INC += -I$(USBHOST_DIR)
|
||||||
|
INC += -Ilwip_inc
|
||||||
|
|
||||||
# Basic Cortex-M flags
|
# Basic Cortex-M flags
|
||||||
CFLAGS_CORTEX_M = -mthumb
|
CFLAGS_CORTEX_M = -mthumb
|
||||||
@ -199,7 +200,6 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
EXTMOD_SRC_C = $(addprefix extmod/,\
|
EXTMOD_SRC_C = $(addprefix extmod/,\
|
||||||
modlwip.c \
|
|
||||||
modonewire.c \
|
modonewire.c \
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -383,47 +383,6 @@ SRC_MOD += $(addprefix $(CC3000_DIR)/src/,\
|
|||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LWIP_DIR = lib/lwip/src
|
|
||||||
INC += -I$(TOP)/$(LWIP_DIR)/include -Ilwip_inc
|
|
||||||
$(BUILD)/$(LWIP_DIR)/core/ipv4/dhcp.o: CFLAGS += -Wno-address
|
|
||||||
SRC_MOD += $(addprefix $(LWIP_DIR)/,\
|
|
||||||
core/def.c \
|
|
||||||
core/dns.c \
|
|
||||||
core/inet_chksum.c \
|
|
||||||
core/init.c \
|
|
||||||
core/ip.c \
|
|
||||||
core/mem.c \
|
|
||||||
core/memp.c \
|
|
||||||
core/netif.c \
|
|
||||||
core/pbuf.c \
|
|
||||||
core/raw.c \
|
|
||||||
core/stats.c \
|
|
||||||
core/sys.c \
|
|
||||||
core/tcp.c \
|
|
||||||
core/tcp_in.c \
|
|
||||||
core/tcp_out.c \
|
|
||||||
core/timeouts.c \
|
|
||||||
core/udp.c \
|
|
||||||
core/ipv4/autoip.c \
|
|
||||||
core/ipv4/dhcp.c \
|
|
||||||
core/ipv4/etharp.c \
|
|
||||||
core/ipv4/icmp.c \
|
|
||||||
core/ipv4/igmp.c \
|
|
||||||
core/ipv4/ip4_addr.c \
|
|
||||||
core/ipv4/ip4.c \
|
|
||||||
core/ipv4/ip4_frag.c \
|
|
||||||
core/ipv6/dhcp6.c \
|
|
||||||
core/ipv6/ethip6.c \
|
|
||||||
core/ipv6/icmp6.c \
|
|
||||||
core/ipv6/inet6.c \
|
|
||||||
core/ipv6/ip6_addr.c \
|
|
||||||
core/ipv6/ip6.c \
|
|
||||||
core/ipv6/ip6_frag.c \
|
|
||||||
core/ipv6/mld6.c \
|
|
||||||
core/ipv6/nd6.c \
|
|
||||||
netif/ethernet.c \
|
|
||||||
)
|
|
||||||
|
|
||||||
OBJ =
|
OBJ =
|
||||||
OBJ += $(PY_O)
|
OBJ += $(PY_O)
|
||||||
OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o))
|
OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o))
|
||||||
|
@ -28,16 +28,17 @@
|
|||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "py/mperrno.h"
|
#include "py/mperrno.h"
|
||||||
#include "lib/netutils/netutils.h"
|
#include "lib/netutils/netutils.h"
|
||||||
#include "lwip/etharp.h"
|
|
||||||
#include "lwip/dns.h"
|
|
||||||
#include "lwip/dhcp.h"
|
|
||||||
#include "netif/ethernet.h"
|
|
||||||
#include "pin_static_af.h"
|
#include "pin_static_af.h"
|
||||||
#include "modnetwork.h"
|
#include "modnetwork.h"
|
||||||
#include "eth.h"
|
#include "eth.h"
|
||||||
|
|
||||||
#if defined(MICROPY_HW_ETH_MDC)
|
#if defined(MICROPY_HW_ETH_MDC)
|
||||||
|
|
||||||
|
#include "lwip/etharp.h"
|
||||||
|
#include "lwip/dns.h"
|
||||||
|
#include "lwip/dhcp.h"
|
||||||
|
#include "netif/ethernet.h"
|
||||||
|
|
||||||
// ETH PHY register definitions (for LAN8742)
|
// ETH PHY register definitions (for LAN8742)
|
||||||
|
|
||||||
#undef PHY_BCR
|
#undef PHY_BCR
|
||||||
|
@ -34,10 +34,13 @@
|
|||||||
#include "lib/mp-readline/readline.h"
|
#include "lib/mp-readline/readline.h"
|
||||||
#include "lib/utils/pyexec.h"
|
#include "lib/utils/pyexec.h"
|
||||||
#include "lib/oofatfs/ff.h"
|
#include "lib/oofatfs/ff.h"
|
||||||
#include "lwip/init.h"
|
|
||||||
#include "extmod/vfs.h"
|
#include "extmod/vfs.h"
|
||||||
#include "extmod/vfs_fat.h"
|
#include "extmod/vfs_fat.h"
|
||||||
|
|
||||||
|
#if MICROPY_PY_LWIP
|
||||||
|
#include "lwip/init.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "systick.h"
|
#include "systick.h"
|
||||||
#include "pendsv.h"
|
#include "pendsv.h"
|
||||||
#include "pybthread.h"
|
#include "pybthread.h"
|
||||||
|
@ -26,12 +26,13 @@
|
|||||||
|
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "lwip/netif.h"
|
|
||||||
#include "modnetwork.h"
|
#include "modnetwork.h"
|
||||||
#include "eth.h"
|
#include "eth.h"
|
||||||
|
|
||||||
#if defined(MICROPY_HW_ETH_MDC)
|
#if defined(MICROPY_HW_ETH_MDC)
|
||||||
|
|
||||||
|
#include "lwip/netif.h"
|
||||||
|
|
||||||
typedef struct _network_lan_obj_t {
|
typedef struct _network_lan_obj_t {
|
||||||
mp_obj_base_t base;
|
mp_obj_base_t base;
|
||||||
eth_t *eth;
|
eth_t *eth;
|
||||||
|
Loading…
Reference in New Issue
Block a user