Skip to content

Commit 7179240

Browse files
robert-hhdpgeorge
authored andcommitted
stm32: Switch Wiznet to use lib/wiznet5k and extmod/network_wiznet5k.
Instead of the old Wiznet driver in drivers/wiznet5k.
1 parent b1efc13 commit 7179240

File tree

3 files changed

+10
-985
lines changed

3 files changed

+10
-985
lines changed

ports/stm32/Makefile

+10-7
Original file line numberDiff line numberDiff line change
@@ -460,19 +460,22 @@ LIBS += $(TOP)/drivers/cyw43/libcyw43.a
460460
endif
461461

462462
ifneq ($(MICROPY_PY_NETWORK_WIZNET5K),0)
463-
WIZNET5K_DIR=drivers/wiznet5k
464-
INC += -I$(TOP)/$(WIZNET5K_DIR)
463+
WIZNET5K_DIR=lib/wiznet5k
464+
GIT_SUBMODULES += lib/wiznet5k
465+
INC += -I$(TOP)/$(WIZNET5K_DIR) -I$(TOP)/$(WIZNET5K_DIR)/Ethernet
465466
CFLAGS_MOD += -DMICROPY_PY_NETWORK_WIZNET5K=$(MICROPY_PY_NETWORK_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_NETWORK_WIZNET5K)
467+
CFLAGS_MOD += -DWIZCHIP_PREFIXED_EXPORTS=1
466468
ifeq ($(MICROPY_PY_LWIP),1)
467469
# When using MACRAW mode (with lwIP), maximum buffer space must be used for the raw socket
468470
CFLAGS_MOD += -DWIZCHIP_USE_MAX_BUFFER
469471
endif
470-
SRC_MOD += network_wiznet5k.c modnwwiznet5k.c
472+
SRC_MOD += extmod/network_wiznet5k.c
471473
SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\
472-
ethernet/w$(MICROPY_PY_NETWORK_WIZNET5K)/w$(MICROPY_PY_NETWORK_WIZNET5K).c \
473-
ethernet/wizchip_conf.c \
474-
ethernet/socket.c \
475-
internet/dns/dns.c \
474+
Ethernet/W$(MICROPY_PY_NETWORK_WIZNET5K)/w$(MICROPY_PY_NETWORK_WIZNET5K).c \
475+
Ethernet/wizchip_conf.c \
476+
Ethernet/socket.c \
477+
Internet/DNS/dns.c \
478+
Internet/DHCP/dhcp.c \
476479
)
477480
endif
478481

0 commit comments

Comments
 (0)