summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-12-13 12:36:12 +1100
committerDamien George <damien.p.george@gmail.com>2019-12-13 12:36:12 +1100
commitc2eaf566349b7aadc0c25ca9817e881b50e606cb (patch)
treea3100847360772426cf84a8e38924be1d941027e
parentcd9de63c0e8ac242148c87869d37dcc295c7497a (diff)
stm32/Makefile: Enable max buffer size on W5200 NIC when used with lwIP.
Because in network_wiznet5k the TX/RX buffers are set to 16k each when in MACRAW mode, which is used with lwIP.
-rw-r--r--ports/stm32/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index 61ce06ca8..c9fdc7b0d 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -408,6 +408,10 @@ ifneq ($(MICROPY_PY_WIZNET5K),0)
WIZNET5K_DIR=drivers/wiznet5k
INC += -I$(TOP)/$(WIZNET5K_DIR)
CFLAGS_MOD += -DMICROPY_PY_WIZNET5K=$(MICROPY_PY_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_WIZNET5K)
+ifeq ($(MICROPY_PY_LWIP),1)
+# When using MACRAW mode (with lwIP), maximum buffer space must be used for the raw socket
+CFLAGS_MOD += -DWIZCHIP_USE_MAX_BUFFER
+endif
SRC_MOD += network_wiznet5k.c modnwwiznet5k.c
SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\
ethernet/w$(MICROPY_PY_WIZNET5K)/w$(MICROPY_PY_WIZNET5K).c \