I was wondering if anyone successfully built the openmv with the “MICROPY_PY_WIZNET5K=5500” flag?
Below is the error when I try to build it.
Thanks,
Will
CC src/usbd_uvc_if.c
CC src/usbd_conf.c
CC src/main.c
CC src/usbd_core.c
CC src/usbd_ctlreq.c
CC src/stm32fxxx_it.c
CC src/string0.c
CC src/usbd_uvc.c
CC src/usbd_ioreq.c
CC src/usbd_desc.c
CC src/systick.c
make[1]: Leaving directory '/home/piliwilliam/openmv/src/uvc'
/home/piliwilliam/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:497: recipe for target 'firmware' failed
make: *** [firmware] Error 1
It looks like you need to edit the MakeFile to include the wiznet c code. Usually, this means you need to find what .c file makes that thing up and add it to the MakeFile which compiles the C file and you also need to edit the main MakeFile that links the .o files.
Having the same issue the screenshot showed the relevant files needed for this variable are available i’m not expert in C code but any help would be very much appreciated as there is only a hand full of comments on this error online.
You need to edit the make file system to include the compile the specified file and then include the .o.
I don’t actually know which files you need to modify. However, it’s not hard. You just have to go into the make files and add the missing file in the right places.
Hi,
Thank you for the response you’re a life saver, wish i knew about grep before! it has fixed all my issues! now on to testing
That a hardware engineer trying to learn firmware for you
I will make a pull request in the morning!
All the Best,
Jack
Warning: FROZEN_MPY_DIR is deprecated in favour of FROZEN_MANIFEST
CC modnetwork.c
In file included from /home/jack/Development/OPENMV_FIRMWARE/openmv/src/micropython/py/objlist.h:29:0,
from modnetwork.c:31:
modnetwork.c:148:46: error: 'mod_network_nic_type_winc' undeclared here (not in a function); did you mean 'mod_network_nic_type_wiznet5k'?
{ MP_ROM_QSTR(MP_QSTR_WINC), MP_ROM_PTR(&mod_network_nic_type_winc) },
^
/home/jack/Development/OPENMV_FIRMWARE/openmv/src/micropython/py/obj.h:249:24: note: in definition of macro 'MP_ROM_PTR'
#define MP_ROM_PTR(p) (p)
^
../../py/mkrules.mk:47: recipe for target '/home/jack/Development/OPENMV_FIRMWARE/openmv/src/build/micropython/modnetwork.o' failed
make[1]: *** [/home/jack/Development/OPENMV_FIRMWARE/openmv/src/build/micropython/modnetwork.o] Error 1
Makefile:643: recipe for target 'FIRMWARE_OBJS' failed
make: *** [FIRMWARE_OBJS] Error 2
Forcing the compile flag has the same result with or without
MICROPY_PY_WIZNET5K=5500
same error as above has been causing with:
make TARGET=OPENMV4 MICROPY_PY_LWIP=1 MICROPY_PY_WINC1500=1
when force disable MICROPY_PY_WINC1500 with:
make TARGET=OPENMV4 MICROPY_PY_WIZNET5K=5500 MICROPY_PY_LWIP=1 MICROPY_PY_WINC1500=0
This is my error message:
CC src/systick.c
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: /home/jack/Development/OPENMV_FIRMWARE/openmv/src/build/bin/firmware.elf section `.text' will not fit in region `FLASH_TEXT'
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: /home/jack/Development/OPENMV_FIRMWARE/openmv/src/build/bin/firmware.elf section `._heap' will not fit in region `SRAM1'
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: region `SRAM1' overflowed by 24012 bytes
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH_TEXT' overflowed by 16 bytes
/home/jack/Development/OPENMV_FIRMWARE/openmv/src/build/micropython/modnetwork.o: In function `pyb_lwip_poll':
/home/jack/Development/OPENMV_FIRMWARE/openmv/src/micropython/ports/stm32/modnetwork.c:61: undefined reference to `wiznet5k_poll'
/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:667: recipe for target 'firmware' failed
make: *** [firmware] Error 1
It looks likes LWIP is causing this somehow, any ideas?
/usr/bin/…/lib/gcc/arm-none-eabi/7.3.1/…/…/…/…/arm-none-eabi/bin/ld: region SRAM1' overflowed by 24012 bytes /usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: region FLASH_TEXT’ overflowed by 16 bytes
If you get this you need to disable things until the firmware fits, try to disable things in imlib_config.h and you need to lower the heap in omv_boardconfig.h
/home/jack/Development/OPENMV_FIRMWARE/openmv/src/build/micropython/modnetwork.o: In function `pyb_lwip_poll':
/home/jack/Development/OPENMV_FIRMWARE/openmv/src/micropython/ports/stm32/modnetwork.c:61: undefined reference to `wiznet5k_poll'
I think the above config will fix these.
Finally keep in mind that even if it builds it still may not work with our firmware, it may be missing a callback or something, so you’re on your own here.