2

I am trying to build custom Micropython firmware with ethernet support for STM32F407VE. I've forked working board without ethernet support and trying to modify it with ethernet support.

Things I have done:

  • defined MICROPY_HW_ETH_* variables in mpconfigboard.h
  • added MICROPY_PY_LWIP = 1 to mpconfigboard.mk
  • added ETH_* pins to pins.csv
  • added additional pins from Port F, G, H, I to pins.csv

Here is my modified board: https://github.com/untitledlt/BLACK_F407VE

Now when I'm trying to build it, i get:

In file included from eth.c:31:
eth.c: In function 'eth_mac_init':
eth.c:163:106: error: implicit declaration of function 'STATIC_AF_ETH_RMII_REF_CLK'; did you mean 'STATIC_AF_ETH_RMII__REF_CLK'? [-Werror=implicit-function-declaration]
     mp_hal_pin_config_alt_static(MICROPY_HW_ETH_RMII_REF_CLK, MP_HAL_PIN_MODE_ALT, MP_HAL_PIN_PULL_NONE, STATIC_AF_ETH_RMII_REF_CLK);
                                                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
pin_static_af.h:42:48: note: in definition of macro 'mp_hal_pin_config_alt_static'
         mp_hal_pin_config(pin_obj, mode, pull, fn_type(pin_obj)) /* Overflow Error => alt func not found */
                                                ^~~~~~~
cc1: all warnings being treated as errors
make: *** [build-BLACK_F407VE/eth.o] Error 1

What am I doing wrong here?

untitled
  • 1,037
  • 2
  • 12
  • 27

1 Answers1

2

There was a bug (typo) in Micropython branch. ETH_RMII__REF_CLK should be replaced with ETH_RMII_REF_CLK in ports/stm32/boards/stm32f405_af.csv file.

It's already fixed by https://github.com/micropython/micropython/pull/5308.

All Credit goes to Mike Causer.

Thanks, Mike!

untitled
  • 1,037
  • 2
  • 12
  • 27