尝试为 STM32 构建自定义 micropython 固件时出现问题

Problems trying to build custom micropython firmware for STM32

我正在尝试为 STM32F407VE 构建具有以太网支持的自定义 Micropython 固件。我在没有以太网支持的情况下分叉了工作板,并尝试通过以太网支持对其进行修改。

我做过的事情:

这是我修改后的板子:https://github.com/untitledlt/BLACK_F407VE

现在,当我尝试构建它时,我得到:

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

我做错了什么?

Micropython 分支中存在错误(拼写错误)。 ETH_RMII__REF_CLK 应替换为 ports/stm32/boards/stm32f405_af.csv 文件中的 ETH_RMII_REF_CLK

它已经被 https://github.com/micropython/micropython/pull/5308 修复了。

所有功劳归功于 Mike Causer。

谢谢,迈克!