Compile problem with core 2.3.0 and STM32Ethernet

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
mattia424
Posts: 6
Joined: Fri Sep 09, 2022 8:34 am

Compile problem with core 2.3.0 and STM32Ethernet

Post by mattia424 »

Hi all, I am trying to compile the example (https://github.com/stm32duino/STM32Ethe ... Client.ino) with core 2.3.0 but it returns the following compilation errors. if I try to compile with core 2.2.0 everything works fine.

Code: Select all

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

C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void low_level_init(netif*)':
C:\Users\*********\Documents\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;
      |                  ^~~~~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                  ^~~~~
C:\Users\*********\Documents\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;
      |                  ^~~~~~~~~~
C:\Users\*********\Documents\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\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:346,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf.h:13,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino/stm32/stm32_def.h:34,
                 from C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:1347:40: error: invalid conversion from 'uint32_t' {aka 'long unsigned int'} to 'ETH_MediaInterfaceTypeDef' [-fpermissive]
 1347 | #define ETH_MEDIA_INTERFACE_RMII      ((uint32_t)SYSCFG_PMC_MII_RMII_SEL)
      |                                       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        uint32_t {aka long unsigned int}
C:\Users\*********\Documents\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;
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                  ^~~~~~
C:\Users\*********\Documents\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;
      |                  ^~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                  ^~~~~~~~~~
C:\Users\*********\Documents\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);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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*}
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:223:57: 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\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:346,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf.h:13,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino/stm32/stm32_def.h:34,
                 from C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2067:19: note: declared here
 2067 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:228:57: 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);
      |                                                         ^
In file included from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:346,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf.h:13,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino/stm32/stm32_def.h:34,
                 from C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2065:19: note: declared here
 2065 | HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'err_t low_level_output(netif*, pbuf*)':
C:\Users\*********\Documents\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
C:\Users\*********\Documents\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
C:\Users\*********\Documents\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) {
      |                     ^~~~~~
C:\Users\*********\Documents\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);
      |                                                     ^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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) {
      |                       ^~~~~~
C:\Users\*********\Documents\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);
      |                                       ^~~~~~~~~~~
C:\Users\*********\Documents\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
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'pbuf* low_level_input(netif*)':
C:\Users\*********\Documents\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) {
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:351:19: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'
  351 |   len = EthHandle.RxFrameInfos.length;
      |                   ^~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                                 ^~~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:360:27: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'
  360 |     dmarxdesc = EthHandle.RxFrameInfos.FSRxDesc;
      |                           ^~~~~~~~~~~~
C:\Users\*********\Documents\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);
      |                                                       ^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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);
      |                                         ^~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:389:25: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'
  389 |   dmarxdesc = EthHandle.RxFrameInfos.FSRxDesc;
      |                         ^~~~~~~~~~~~
C:\Users\*********\Documents\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++) {
      |                             ^~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                ^~~~~~
C:\Users\*********\Documents\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);
      |                                                   ^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:397:13: error: 'struct ETH_HandleTypeDef' has no member named 'RxFrameInfos'
  397 |   EthHandle.RxFrameInfos.SegCount = 0;
      |             ^~~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'uint8_t ethernetif_is_init()':
C:\Users\*********\Documents\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
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void ethernetif_set_link(netif*)':
C:\Users\*********\Documents\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*}
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:509:58: 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);
      |                                                          ^
In file included from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:346,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf.h:13,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino/stm32/stm32_def.h:34,
                 from C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2067:19: note: declared here
 2067 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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*}
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:516:57: 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);
      |                                                         ^
In file included from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:346,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf.h:13,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino/stm32/stm32_def.h:34,
                 from C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2067:19: note: declared here
 2067 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void ethernetif_update_config(netif*)':
C:\Users\*********\Documents\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) {
      |                        ^~~~~~~~~~~~~~~
C:\Users\*********\Documents\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*}
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:545:60: 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);
      |                                                            ^
In file included from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf_default.h:346,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/STM32F4xx/stm32f4xx_hal_conf.h:13,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:287,
                 from C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\cores\arduino/stm32/stm32_def.h:34,
                 from C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\*********\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.3.0\system/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_eth.h:2067:19: note: declared here
 2067 | HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint32_t PHYAddr, uint32_t PHYReg,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                        ^~~~~~~~~~
C:\Users\*********\Documents\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;
      |                                     ^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                        ^~~~~~~~~~
C:\Users\*********\Documents\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;
      |                                     ^~~~~~~~~~~~~~~~~~~
C:\Users\*********\Documents\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;
      |                        ^~~~~
C:\Users\*********\Documents\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;
      |                        ^~~~~
C:\Users\*********\Documents\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) |
      |                                                                                ^~~~~~~~~~
C:\Users\*********\Documents\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)));
      |                                                                                ^~~~~
C:\Users\*********\Documents\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
C:\Users\*********\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:578:56: error: expected primary-expression before ')' token
  578 |     HAL_ETH_ConfigMAC(&EthHandle, (ETH_MACInitTypeDef *) NULL);
      |                                                        ^
C:\Users\*********\Documents\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
Errore durante la compilazione per la scheda Generic STM32F4 series.
by fpiSTM » Fri Sep 09, 2022 12:48 pm
OK. I found the issue. Since 2.3.0, the STM32CubeF4 has been updated. Since this update the old HAL ETH driver has been reworked by ST.
In that case you have to enable the

Code: Select all

HAL_ETH_LEGACY_MODULE_ENABLED
In the variant_generic.h apply this patch: https://github.com/stm32duino/Arduino_C ... #L250-L252

Code: Select all

-  #define HAL_ETH_MODULE_ENABLED
+  /* #define HAL_ETH_MODULE_ENABLED */
+  /* For compatibility until STM32Ethernet library is updated */
+  #define HAL_ETH_LEGACY_MODULE_ENABLED
I will fix that in the core.
Go to full post
Last edited by mattia424 on Fri Sep 09, 2022 11:05 am, edited 3 times in total.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Compile problem with core 2.3.0 and STM32Ethernet

Post by fpiSTM »

Which board?
mattia424
Posts: 6
Joined: Fri Sep 09, 2022 8:34 am

Re: Compile problem with core 2.3.0 and STM32Ethernet

Post by mattia424 »

On a proprietary board based on STM32F429ZI
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Compile problem with core 2.3.0 and STM32Ethernet

Post by fpiSTM »

OK. I found the issue. Since 2.3.0, the STM32CubeF4 has been updated. Since this update the old HAL ETH driver has been reworked by ST.
In that case you have to enable the

Code: Select all

HAL_ETH_LEGACY_MODULE_ENABLED
In the variant_generic.h apply this patch: https://github.com/stm32duino/Arduino_C ... #L250-L252

Code: Select all

-  #define HAL_ETH_MODULE_ENABLED
+  /* #define HAL_ETH_MODULE_ENABLED */
+  /* For compatibility until STM32Ethernet library is updated */
+  #define HAL_ETH_LEGACY_MODULE_ENABLED
I will fix that in the core.
mattia424
Posts: 6
Joined: Fri Sep 09, 2022 8:34 am

Re: Compile problem with core 2.3.0 and STM32Ethernet

Post by mattia424 »

Thanks! now it works correctly
Post Reply

Return to “General discussion”