@@ -80,10 +80,9 @@ INC += -I$(TOP)/lib/tinyusb/src
8080INC += -I$(TOP ) /shared/tinyusb
8181INC += -I.
8282INC += -Ihal
83-
84- # All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
85- ifeq ($(MICROPY_PY_LWIP ) ,1)
8683INC += -Ilwip_inc
84+
85+ ifeq ($(MICROPY_HW_ETHERNET ) ,1)
8786INC += -Ihal/phy
8887endif
8988
@@ -106,8 +105,10 @@ SRC_TINYUSB_C += \
106105 lib/tinyusb/src/portable/chipidea/ci_hs/dcd_ci_hs.c \
107106 lib/tinyusb/src/tusb.c
108107
109- # All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
110- ifeq ($(MICROPY_PY_LWIP ) ,1)
108+ # All settings for Ethernet support are controlled by the value of MICROPY_HW_ETHERNET
109+ ifeq ($(MICROPY_HW_ETHERNET ) ,1)
110+ MICROPY_PY_LWIP = 1
111+
111112SRC_ETH_C += \
112113 $(MCUX_SDK_DIR ) /drivers/enet/fsl_enet.c \
113114 hal/phy/device/phydp83825/fsl_phydp83825.c \
@@ -281,6 +282,7 @@ SHARED_SRC_C += \
281282 shared/timeutils/timeutils.c \
282283 shared/tinyusb/mp_usbd.c \
283284 shared/tinyusb/mp_usbd_cdc.c \
285+ shared/tinyusb/mp_usbd_net.c \
284286 shared/tinyusb/mp_usbd_descriptor.c \
285287
286288# Set flash driver name, base address and internal flash flag, based on the flash type.
447449endif
448450
449451
450- # All settings for Ethernet support are controller by the value of MICROPY_PY_LWIP
451- ifeq ($(MICROPY_PY_LWIP ) ,1)
452+ # All settings for Ethernet support are controlled by the value of MICROPY_HW_ETHERNET
453+ ifeq ($(MICROPY_HW_ETHERNET ) ,1)
452454CFLAGS += \
453455 -DFSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE=1
454456endif
@@ -470,7 +472,8 @@ LDFLAGS += \
470472 --gc-sections \
471473 --print-memory-usage \
472474 -Map=$@ .map \
473- --wrap=LPUART_TransferHandleIRQ
475+ --wrap=LPUART_TransferHandleIRQ \
476+ --wrap=dcd_event_handler
474477
475478# LDDEFINES are used for link time adaptation of linker scripts, utilizing
476479# the C preprocessor. Therefore keep LDDEFINES separated from LDFLAGS!
0 commit comments