This is a update of my findings:
Using the "MICROPY_PY_WIZNET5K=5500" flag:
this files the compiling of the c code in the stm32/makefile
Code: Select all
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 \
ethernet/wizchip_conf.c \
ethernet/socket.c \
internet/dns/dns.c \
)
endif
This error is still occurring even when i have added the o files that have been compiled in the
After added the relevant compiled libraries into the build in the /src/MakeFile
Code: Select all
ifneq ($(MICROPY_PY_WIZNET5K),0)
FIRM_OBJ += $(addprefix $(BUILD)/$(MICROPY_DIR)/drivers/,\
wiznet5k/ethernet/w$(MICROPY_PY_WIZNET5K)/w$(MICROPY_PY_WIZNET5K).o \
wiznet5k/ethernet/wizchip_conf.o \
wiznet5k/ethernet/socket.o \
wiznet5k/internet/dns/dns.o \
)
endif
This is still causing the original issue
Code: Select all
/home/jack/Development/OPENMV_FIRMWARE/openmv/src/build/micropython/modnetwork.o:(.rodata.mp_module_network_globals_table+0xc): undefined reference to `mod_network_nic_type_wiznet5k'
collect2: error: ld returned 1 exit status
Makefile:674: recipe for target 'firmware' failed
make: *** [firmware] Error 1
There is only one modnetwork.o so that doesnt need to be changed. all the relevant files are in place. I am unsure what 'mod_network_nic_type_wiznet5k' maybe its a parameter needed in the make file i have logged an issue with the micropython github hopefully they can give me the parameter i need to declare:
https://github.com/micropython/micropython/issues/6625