Trying to add ethernet support to STM32F407VE

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
User avatar
untitled
Posts: 24
Joined: Sat Nov 02, 2019 1:44 pm

Trying to add ethernet support to STM32F407VE

Post by untitled » Wed Nov 06, 2019 10:50 pm

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:

Code: Select all

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?

DJShadow1966
Posts: 60
Joined: Sun Jun 23, 2019 4:55 am
Location: Gateshead, Tyne and Wear

Re: Trying to add ethernet support to STM32F407VE

Post by DJShadow1966 » Thu Nov 07, 2019 1:18 pm

Hello

The is an error in the CSV file I need to find the right on.

Regards Mike

DJShadow1966
Posts: 60
Joined: Sun Jun 23, 2019 4:55 am
Location: Gateshead, Tyne and Wear

Re: Trying to add ethernet support to STM32F407VE

Post by DJShadow1966 » Thu Nov 07, 2019 1:31 pm

Hello
Found it there is an error in the file stm32f407_af.csv, on line four it has the following :-

ETH_MII_RX_CLK/ETH_RMII__REF_CLK

The fault is between the RMII and REF there are two _ when in fact there should be only one i.e. ETH_MII_RX_CLK/ETH_RMII_REF_CLK .
That will fix the issue

Regards Mike

User avatar
untitled
Posts: 24
Joined: Sat Nov 02, 2019 1:44 pm

Re: Trying to add ethernet support to STM32F407VE

Post by untitled » Fri Nov 08, 2019 9:19 am

Thanks Mike!
Never thought it could be so simple :)

Feel free to collect your +50 bounty on https://stackoverflow.com/questions/586 ... -for-stm32

DJShadow1966
Posts: 60
Joined: Sun Jun 23, 2019 4:55 am
Location: Gateshead, Tyne and Wear

Re: Trying to add ethernet support to STM32F407VE

Post by DJShadow1966 » Fri Nov 08, 2019 12:57 pm

Hello

Lucky for you I found it took my a few days to find it myself, was tearing what hair I have out.

Mike

User avatar
ta1db
Posts: 53
Joined: Mon Sep 02, 2019 12:05 pm
Contact:

Re: Trying to add ethernet support to STM32F407VE

Post by ta1db » Sat Dec 07, 2019 8:38 am

Excellent work guys..

@untitled which ethernet board and driver you use with STMF407VE?

I am trying to use a W5100 board with NucleoF401RE and need w5100 c h files. I found a source here https://github.com/Wiznet/ioLibrary_Driver but the w5100 c h files found here need to be reworked for MicroPython. Also in this source some other codes for FTP SNMP SNTP TFTP HTTP MQTT exist in addition to DHCP and DNS.

Post Reply