Skip to content

Unable to build with STM32F4 #2003

Closed
@nopnop2002

Description

@nopnop2002

I built this.

I got this error:

Arduino: 1.8.19 (Windows 10), Board: "Generic STM32F4 series, Black F407VE, STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), None, Newlib Nano (default)"





















Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void low_level_init(netif*)':

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:170:18: error: 'struct ETH_InitTypeDef' has no member named 'AutoNegotiation'

  170 |   EthHandle.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE;

      |                  ^~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:171:18: error: 'struct ETH_InitTypeDef' has no member named 'Speed'

  171 |   EthHandle.Init.Speed = ETH_SPEED_100M;

      |                  ^~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:172:18: error: 'struct ETH_InitTypeDef' has no member named 'DuplexMode'

  172 |   EthHandle.Init.DuplexMode = ETH_MODE_FULLDUPLEX;

      |                  ^~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:172:31: error: 'ETH_MODE_FULLDUPLEX' was not declared in this scope

  172 |   EthHandle.Init.DuplexMode = ETH_MODE_FULLDUPLEX;

      |                               ^~~~~~~~~~~~~~~~~~~

In file included from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:132,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\cores\arduino/stm32/stm32_def.h:36,

                 from \\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h:11633:53: error: invalid conversion from 'long unsigned int' to 'ETH_MediaInterfaceTypeDef' [-fpermissive]

11633 | #define SYSCFG_PMC_MII_RMII_SEL_Msk          (0x1UL << SYSCFG_PMC_MII_RMII_SEL_Pos) /*!< 0x00800000 */

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f407xx.h:11634:46: note: in expansion of macro 'SYSCFG_PMC_MII_RMII_SEL_Msk'

11634 | #define SYSCFG_PMC_MII_RMII_SEL              SYSCFG_PMC_MII_RMII_SEL_Msk       /*!<Ethernet PHY interface selection */

      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:1344:40: note: in expansion of macro 'SYSCFG_PMC_MII_RMII_SEL'

 1344 | #define ETH_MEDIA_INTERFACE_RMII      (SYSCFG_PMC_MII_RMII_SEL)

      |                                        ^~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:174:35: note: in expansion of macro 'ETH_MEDIA_INTERFACE_RMII'

  174 |   EthHandle.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII;

      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:181:18: error: 'struct ETH_InitTypeDef' has no member named 'RxMode'

  181 |   EthHandle.Init.RxMode = ETH_RXPOLLING_MODE;

      |                  ^~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:183:18: error: 'struct ETH_InitTypeDef' has no member named 'ChecksumMode'

  183 |   EthHandle.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE;

      |                  ^~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:184:18: error: 'struct ETH_InitTypeDef' has no member named 'PhyAddress'

  184 |   EthHandle.Init.PhyAddress = LAN8742A_PHY_ADDRESS;

      |                  ^~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:193:3: error: 'HAL_ETH_DMATxDescListInit' was not declared in this scope

  193 |   HAL_ETH_DMATxDescListInit(&EthHandle, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB);

      |   ^~~~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:196:3: error: 'HAL_ETH_DMARxDescListInit' was not declared in this scope

  196 |   HAL_ETH_DMARxDescListInit(&EthHandle, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB);

      |   ^~~~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:223:48: error: invalid conversion from 'uint32_t*' {aka 'long unsigned int*'} to 'uint32_t' {aka 'long unsigned int'} [-fpermissive]

  223 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_IMR, &regvalue);

      |                                                ^~~~~~~~~

      |                                                |

      |                                                uint32_t* {aka long unsigned int*}

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:223:26: error: too few arguments to function 'HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef*, uint32_t, uint32_t, uint32_t*)'

  223 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_IMR, &regvalue);

      |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:346,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/STM32F4xx/stm32f4xx_hal_conf.h:19,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287:

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2064:19: note: declared here

 2064 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,

      |                   ^~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:228:27: error: too few arguments to function 'HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef*, uint32_t, uint32_t, uint32_t)'

  228 |   HAL_ETH_WritePHYRegister(&EthHandle, PHY_IMR, regvalue);

      |   ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2062:19: note: declared here

 2062 | HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,

      |                   ^~~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'err_t low_level_output(netif*, pbuf*)':

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:254:43: error: 'struct ETH_HandleTypeDef' has no member named 'TxDesc'; did you mean 'TxDescList'?

  254 |   uint8_t *buffer = (uint8_t *)(EthHandle.TxDesc->Buffer1Addr);

      |                                           ^~~~~~

      |                                           TxDescList

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:263:25: error: 'struct ETH_HandleTypeDef' has no member named 'TxDesc'; did you mean 'TxDescList'?

  263 |   DmaTxDesc = EthHandle.TxDesc;

      |                         ^~~~~~

      |                         TxDescList

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:269:21: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Status'

  269 |     if ((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) {

      |                     ^~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:284:53: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Buffer2NextDescAddr'

  284 |       DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr);

      |                                                     ^~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:287:23: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Status'

  287 |       if ((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) {

      |                       ^~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:292:39: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Buffer1Addr'

  292 |       buffer = (uint8_t *)(DmaTxDesc->Buffer1Addr);

      |                                       ^~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:307:3: error: 'HAL_ETH_TransmitFrame' was not declared in this scope; did you mean 'HAL_ETH_Transmit_IT'?

  307 |   HAL_ETH_TransmitFrame(&EthHandle, framelength);

      |   ^~~~~~~~~~~~~~~~~~~~~

      |   HAL_ETH_Transmit_IT

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'pbuf* low_level_input(netif*)':

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:346:7: error: 'HAL_ETH_GetReceivedFrame_IT' was not declared in this scope

  346 |   if (HAL_ETH_GetReceivedFrame_IT(&EthHandle) != HAL_OK) {

      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:351:19: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'

  351 |   len = EthHandle.RxFrameInfos.length;

      |                   ^~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:352:33: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'

  352 |   buffer = (uint8_t *)EthHandle.RxFrameInfos.buffer;

      |                                 ^~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:360:27: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'

  360 |     dmarxdesc = EthHandle.RxFrameInfos.FSRxDesc;

      |                           ^~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:373:55: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Buffer2NextDescAddr'

  373 |         dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);

      |                                                       ^~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:374:41: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Buffer1Addr'

  374 |         buffer = (uint8_t *)(dmarxdesc->Buffer1Addr);

      |                                         ^~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:389:25: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'

  389 |   dmarxdesc = EthHandle.RxFrameInfos.FSRxDesc;

      |                         ^~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:391:29: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'

  391 |   for (i = 0; i < EthHandle.RxFrameInfos.SegCount; i++) {

      |                             ^~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:392:16: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Status'

  392 |     dmarxdesc->Status |= ETH_DMARXDESC_OWN;

      |                ^~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:393:51: error: 'volatile struct ETH_DMADescTypeDef' has no member named 'Buffer2NextDescAddr'

  393 |     dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);

      |                                                   ^~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:397:13: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'

  397 |   EthHandle.RxFrameInfos.SegCount = 0;

      |             ^~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'uint8_t ethernetif_is_init()':

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:449:21: error: 'struct ETH_HandleTypeDef' has no member named 'State'; did you mean 'gState'?

  449 |   return (EthHandle.State != HAL_ETH_STATE_RESET);

      |                     ^~~~~

      |                     gState

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void ethernetif_set_link(netif*)':

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:509:49: error: invalid conversion from 'uint32_t*' {aka 'long unsigned int*'} to 'uint32_t' {aka 'long unsigned int'} [-fpermissive]

  509 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ISFR, &regvalue);

      |                                                 ^~~~~~~~~

      |                                                 |

      |                                                 uint32_t* {aka long unsigned int*}

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:509:26: error: too few arguments to function 'HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef*, uint32_t, uint32_t, uint32_t*)'

  509 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ISFR, &regvalue);

      |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2064:19: note: declared here

 2064 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,

      |                   ^~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:516:48: error: invalid conversion from 'uint32_t*' {aka 'long unsigned int*'} to 'uint32_t' {aka 'long unsigned int'} [-fpermissive]

  516 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_BSR, &regvalue);

      |                                                ^~~~~~~~~

      |                                                |

      |                                                uint32_t* {aka long unsigned int*}

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:516:26: error: too few arguments to function 'HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef*, uint32_t, uint32_t, uint32_t*)'

  516 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_BSR, &regvalue);

      |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2064:19: note: declared here

 2064 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,

      |                   ^~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void ethernetif_update_config(netif*)':

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:542:24: error: 'struct ETH_InitTypeDef' has no member named 'AutoNegotiation'

  542 |     if (EthHandle.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) {

      |                        ^~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:545:51: error: invalid conversion from 'uint32_t*' {aka 'long unsigned int*'} to 'uint32_t' {aka 'long unsigned int'} [-fpermissive]

  545 |       HAL_ETH_ReadPHYRegister(&EthHandle, PHY_SR, &regvalue);

      |                                                   ^~~~~~~~~

      |                                                   |

      |                                                   uint32_t* {aka long unsigned int*}

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:545:30: error: too few arguments to function 'HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef*, uint32_t, uint32_t, uint32_t*)'

  545 |       HAL_ETH_ReadPHYRegister(&EthHandle, PHY_SR, &regvalue);

      |       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2064:19: note: declared here

 2064 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,

      |                   ^~~~~~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:553:24: error: 'struct ETH_InitTypeDef' has no member named 'DuplexMode'

  553 |         EthHandle.Init.DuplexMode = ETH_MODE_FULLDUPLEX;

      |                        ^~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:553:37: error: 'ETH_MODE_FULLDUPLEX' was not declared in this scope

  553 |         EthHandle.Init.DuplexMode = ETH_MODE_FULLDUPLEX;

      |                                     ^~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:556:24: error: 'struct ETH_InitTypeDef' has no member named 'DuplexMode'

  556 |         EthHandle.Init.DuplexMode = ETH_MODE_HALFDUPLEX;

      |                        ^~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:556:37: error: 'ETH_MODE_HALFDUPLEX' was not declared in this scope

  556 |         EthHandle.Init.DuplexMode = ETH_MODE_HALFDUPLEX;

      |                                     ^~~~~~~~~~~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:561:24: error: 'struct ETH_InitTypeDef' has no member named 'Speed'

  561 |         EthHandle.Init.Speed = ETH_SPEED_10M;

      |                        ^~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:564:24: error: 'struct ETH_InitTypeDef' has no member named 'Speed'

  564 |         EthHandle.Init.Speed = ETH_SPEED_100M;

      |                        ^~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:573:80: error: 'struct ETH_InitTypeDef' has no member named 'DuplexMode'

  573 |       HAL_ETH_WritePHYRegister(&EthHandle, PHY_BCR, ((uint16_t)(EthHandle.Init.DuplexMode >> 3) |

      |                                                                                ^~~~~~~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:574:80: error: 'struct ETH_InitTypeDef' has no member named 'Speed'

  574 |                                                      (uint16_t)(EthHandle.Init.Speed >> 1)));

      |                                                                                ^~~~~

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:578:36: error: 'ETH_MACInitTypeDef' was not declared in this scope; did you mean 'ETH_InitTypeDef'?

  578 |     HAL_ETH_ConfigMAC(&EthHandle, (ETH_MACInitTypeDef *) NULL);

      |                                    ^~~~~~~~~~~~~~~~~~

      |                                    ETH_InitTypeDef

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:578:56: error: expected primary-expression before ')' token

  578 |     HAL_ETH_ConfigMAC(&EthHandle, (ETH_MACInitTypeDef *) NULL);

      |                                                        ^

\\LANDISK-HDL-AA1\disk1\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:578:5: error: 'HAL_ETH_ConfigMAC' was not declared in this scope

  578 |     HAL_ETH_ConfigMAC(&EthHandle, (ETH_MACInitTypeDef *) NULL);

      |     ^~~~~~~~~~~~~~~~~

exit status 1

Error compiling for board Generic STM32F4 series.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

So,I enabled HAL_ETH_LEGACY_MODULE_ENABLED according to this.

stm32f4xx_hal_conf.h

#ifndef __STM32F4xx_HAL_CONF_H
#define __STM32F4xx_HAL_CONF_H

#include "variant.h"

// Enable legacy HAL Ethernet driver
#define HAL_CAN_LEGACY_MODULE_ENABLED

/* STM32F4xx specific HAL configuration options. */
#if __has_include("hal_conf_custom.h")
#include "hal_conf_custom.h"
#else
#if __has_include("hal_conf_extra.h")
#include "hal_conf_extra.h"
#endif
#include "stm32f4xx_hal_conf_default.h"
#endif

#endif /* __STM32F4xx_HAL_CONF_H */

I got this error:

Arduino: 1.8.19 (Windows 10), Board: "Generic STM32F4 series, Black F407VE, STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), None, Newlib Nano (default)"





















Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB

In file included from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/STM32F4xx/stm32f4xx_hal_conf.h:19,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\cores\arduino/stm32/stm32_def.h:36,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\cores\arduino/stm32/clock.h:19,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\cores\arduino/wiring.h:38,

                 from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\cores\arduino/Arduino.h:36,

                 from sketch\DhcpAddressPrinter.ino.cpp:1:

C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:322:10: fatal error: stm32f4xx_hal_can_legacy.h: No such file or directory

  322 | #include "stm32f4xx_hal_can_legacy.h"

      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board Generic STM32F4 series.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

My environment:

Arduino-STM32-Ethernet-LAN8720-1
Arduino-STM32-Ethernet-LAN8720-2

Build options:

Arduino-STM32-Ethernet-LAN8720-3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions