stm32duino / STM32Ethernet

Arduino library to support Ethernet for STM32 based board
151 stars 42 forks source link

Compilation failed with UDPSendReceiveString example and BluePill stm32f103c8 #51

Closed MathisDELOGE closed 3 years ago

MathisDELOGE commented 3 years ago

Hi,

I have many compilations errors trying the UDPSendReceiveString example on a bluePill stmf103c8.

In arduino IDE, I selected the board type 'generic stm32f1 series' with the board part number 'BluePill F103C8'. In the library manager I added the STM32duino STM32Ethernet library (and LwIP at the same time).

image image

When I try the UDPSendReceiveString example, I get these errors :

C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:80:15: error: 'ETH_DMADescTypeDef' does not name a type
   80 | __ALIGN_BEGIN ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB] __ALIGN_END;/* Ethernet Rx MA Descriptor */
      |               ^~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:85:15: error: 'ETH_DMADescTypeDef' does not name a type
   85 | __ALIGN_BEGIN ETH_DMADescTypeDef  DMATxDscrTab[ETH_TXBUFNB] __ALIGN_END;/* Ethernet Tx DMA Descriptor */
      |               ^~~~~~~~~~~~~~~~~~
In file included from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32F1xx/stm32f1xx_hal_conf.h:13,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:30,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:200,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:28,
                 from C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32F1xx/stm32f1xx_hal_conf_default.h:187:40: error: 'ETH_MAX_PACKET_SIZE' was not declared in this scope
  187 | #define ETH_RX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for receive               */
      |                                        ^~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:90:44: note: in expansion of macro 'ETH_RX_BUF_SIZE'
   90 | __ALIGN_BEGIN uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __ALIGN_END; /* Ethernet Receive Buffer */
      |                                            ^~~~~~~~~~~~~~~
C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32F1xx/stm32f1xx_hal_conf_default.h:188:40: error: 'ETH_MAX_PACKET_SIZE' was not declared in this scope
  188 | #define ETH_TX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for transmit              */
      |                                        ^~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:95:44: note: in expansion of macro 'ETH_TX_BUF_SIZE'
   95 | __ALIGN_BEGIN uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __ALIGN_END; /* Ethernet Transmit Buffer */
      |                                            ^~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:97:8: error: 'ETH_HandleTypeDef' does not name a type; did you mean 'RTC_HandleTypeDef'?
   97 | static ETH_HandleTypeDef EthHandle;
      |        ^~~~~~~~~~~~~~~~~
      |        RTC_HandleTypeDef
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:116:22: error: variable or field 'HAL_ETH_MspInit' declared void
  116 | void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
      |                      ^~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:116:22: error: 'ETH_HandleTypeDef' was not declared in this scope; did you mean 'RTC_HandleTypeDef'?
  116 | void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
      |                      ^~~~~~~~~~~~~~~~~
      |                      RTC_HandleTypeDef
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:116:41: error: 'heth' was not declared in this scope
  116 | void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
      |                                         ^~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void low_level_init(netif*)':
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:168:3: error: 'EthHandle' was not declared in this scope
  168 |   EthHandle.Instance = ETH;
      |   ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:168:24: error: 'ETH' was not declared in this scope
  168 |   EthHandle.Instance = ETH;
      |                        ^~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:170:36: error: 'ETH_AUTONEGOTIATION_ENABLE' was not declared in this scope
  170 |   EthHandle.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE;
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\stm32_eth.cpp: In function 'void TIM_scheduler_Config()':
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\stm32_eth.cpp:66:33: error: 'TIM14' was not declared in this scope; did you mean 'TIM1'?
   66 | #define DEFAULT_ETHERNET_TIMER  TIM14
      |                                 ^~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\stm32_eth.cpp:178:45: note: in expansion of macro 'DEFAULT_ETHERNET_TIMER'
  178 |   HardwareTimer *EthTim = new HardwareTimer(DEFAULT_ETHERNET_TIMER);
      |                                             ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:171:26: error: 'ETH_SPEED_100M' was not declared in this scope
  171 |   EthHandle.Init.Speed = ETH_SPEED_100M;
      |                          ^~~~~~~~~~~~~~
C:\Users\Mathis\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;
      |                               ^~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:174:35: error: 'ETH_MEDIA_INTERFACE_RMII' was not declared in this scope
  174 |   EthHandle.Init.MediaInterface = ETH_MEDIA_INTERFACE_RMII;
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:181:27: error: 'ETH_RXPOLLING_MODE' was not declared in this scope
  181 |   EthHandle.Init.RxMode = ETH_RXPOLLING_MODE;
      |                           ^~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:183:33: error: 'ETH_CHECKSUM_BY_HARDWARE' was not declared in this scope; did you mean 'CHECKSUM_BY_HARDWARE'?
  183 |   EthHandle.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                 CHECKSUM_BY_HARDWARE
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:184:31: error: 'LAN8742A_PHY_ADDRESS' was not declared in this scope
  184 |   EthHandle.Init.PhyAddress = LAN8742A_PHY_ADDRESS;
      |                               ^~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:187:7: error: 'HAL_ETH_Init' was not declared in this scope; did you mean 'HAL_RTC_Init'?
  187 |   if (HAL_ETH_Init(&EthHandle) == HAL_OK) {
      |       ^~~~~~~~~~~~
      |       HAL_RTC_Init
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:193:41: error: 'DMATxDscrTab' was not declared in this scope
  193 |   HAL_ETH_DMATxDescListInit(&EthHandle, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB);
      |                                         ^~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:193:56: error: 'Tx_Buff' was not declared in this scope
  193 |   HAL_ETH_DMATxDescListInit(&EthHandle, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB);
      |                                                        ^~~~~~~
C:\Users\Mathis\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\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:196:41: error: 'DMARxDscrTab' was not declared in this scope
  196 |   HAL_ETH_DMARxDescListInit(&EthHandle, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB);
      |                                         ^~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:196:56: error: 'Rx_Buff' was not declared in this scope
  196 |   HAL_ETH_DMARxDescListInit(&EthHandle, DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB);
      |                                                        ^~~~~~~
C:\Users\Mathis\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\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:217:3: error: 'HAL_ETH_Start' was not declared in this scope; did you mean 'HAL_ADC_Start'?
  217 |   HAL_ETH_Start(&EthHandle);
      |   ^~~~~~~~~~~~~
      |   HAL_ADC_Start
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:223:39: error: 'PHY_IMR' was not declared in this scope; did you mean 'PHY_MISR'?
  223 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_IMR, &regvalue);
      |                                       ^~~~~~~
      |                                       PHY_MISR
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:223:3: error: 'HAL_ETH_ReadPHYRegister' was not declared in this scope
  223 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_IMR, &regvalue);
      |   ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:225:15: error: 'PHY_ISFR_INT4' was not declared in this scope
  225 |   regvalue |= PHY_ISFR_INT4;
      |               ^~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:228:3: error: 'HAL_ETH_WritePHYRegister' was not declared in this scope
  228 |   HAL_ETH_WritePHYRegister(&EthHandle, PHY_IMR, regvalue);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'err_t low_level_output(netif*, pbuf*)':
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:254:33: error: 'EthHandle' was not declared in this scope
  254 |   uint8_t *buffer = (uint8_t *)(EthHandle.TxDesc->Buffer1Addr);
      |                                 ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:255:8: error: 'ETH_DMADescTypeDef' does not name a type
  255 |   __IO ETH_DMADescTypeDef *DmaTxDesc;
      |        ^~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:263:3: error: 'DmaTxDesc' was not declared in this scope
  263 |   DmaTxDesc = EthHandle.TxDesc;
      |   ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:269:30: error: 'ETH_DMATXDESC_OWN' was not declared in this scope
  269 |     if ((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) {
      |                              ^~~~~~~~~~~~~~~~~
In file included from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32F1xx/stm32f1xx_hal_conf.h:13,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:30,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:200,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:28,
                 from C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32F1xx/stm32f1xx_hal_conf_default.h:188:40: error: 'ETH_MAX_PACKET_SIZE' was not declared in this scope
  188 | #define ETH_TX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for transmit              */
      |                                        ^~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:279:47: note: in expansion of macro 'ETH_TX_BUF_SIZE'
  279 |     while ((byteslefttocopy + bufferoffset) > ETH_TX_BUF_SIZE) {
      |                                               ^~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:284:20: error: 'ETH_DMADescTypeDef' was not declared in this scope
  284 |       DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr);
      |                    ^~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:284:40: error: expected primary-expression before ')' token
  284 |       DmaTxDesc = (ETH_DMADescTypeDef *)(DmaTxDesc->Buffer2NextDescAddr);
      |                                        ^
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:287:32: error: 'ETH_DMATXDESC_OWN' was not declared in this scope
  287 |       if ((DmaTxDesc->Status & ETH_DMATXDESC_OWN) != (uint32_t)RESET) {
      |                                ^~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:307:3: error: 'HAL_ETH_TransmitFrame' was not declared in this scope
  307 |   HAL_ETH_TransmitFrame(&EthHandle, framelength);
      |   ^~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:314:36: error: 'ETH_DMASR_TUS' was not declared in this scope
  314 |   if ((EthHandle.Instance->DMASR & ETH_DMASR_TUS) != (uint32_t)RESET) {
      |                                    ^~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'pbuf* low_level_input(netif*)':
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:338:8: error: 'ETH_DMADescTypeDef' does not name a type
  338 |   __IO ETH_DMADescTypeDef *dmarxdesc;
      |        ^~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:346:36: error: 'EthHandle' was not declared in this scope
  346 |   if (HAL_ETH_GetReceivedFrame_IT(&EthHandle) != HAL_OK) {
      |                                    ^~~~~~~~~
C:\Users\Mathis\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\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:351:9: error: 'EthHandle' was not declared in this scope
  351 |   len = EthHandle.RxFrameInfos.length;
      |         ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:360:5: error: 'dmarxdesc' was not declared in this scope
  360 |     dmarxdesc = EthHandle.RxFrameInfos.FSRxDesc;
      |     ^~~~~~~~~
In file included from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32F1xx/stm32f1xx_hal_conf.h:13,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:30,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:200,
                 from C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:28,
                 from C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:48:
C:\Users\Mathis\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32F1xx/stm32f1xx_hal_conf_default.h:187:40: error: 'ETH_MAX_PACKET_SIZE' was not declared in this scope
  187 | #define ETH_RX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for receive               */
      |                                        ^~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:368:49: note: in expansion of macro 'ETH_RX_BUF_SIZE'
  368 |       while ((byteslefttocopy + bufferoffset) > ETH_RX_BUF_SIZE) {
      |                                                 ^~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:373:22: error: 'ETH_DMADescTypeDef' was not declared in this scope
  373 |         dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
      |                      ^~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:373:42: error: expected primary-expression before ')' token
  373 |         dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
      |                                          ^
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:389:3: error: 'dmarxdesc' was not declared in this scope
  389 |   dmarxdesc = EthHandle.RxFrameInfos.FSRxDesc;
      |   ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:392:26: error: 'ETH_DMARXDESC_OWN' was not declared in this scope
  392 |     dmarxdesc->Status |= ETH_DMARXDESC_OWN;
      |                          ^~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:393:18: error: 'ETH_DMADescTypeDef' was not declared in this scope
  393 |     dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
      |                  ^~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:393:38: error: expected primary-expression before ')' token
  393 |     dmarxdesc = (ETH_DMADescTypeDef *)(dmarxdesc->Buffer2NextDescAddr);
      |                                      ^
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:400:36: error: 'ETH_DMASR_RBUS' was not declared in this scope
  400 |   if ((EthHandle.Instance->DMASR & ETH_DMASR_RBUS) != (uint32_t)RESET) {
      |                                    ^~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'uint8_t ethernetif_is_init()':
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:449:11: error: 'EthHandle' was not declared in this scope
  449 |   return (EthHandle.State != HAL_ETH_STATE_RESET);
      |           ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:449:30: error: 'HAL_ETH_STATE_RESET' was not declared in this scope; did you mean 'HAL_RTC_STATE_RESET'?
  449 |   return (EthHandle.State != HAL_ETH_STATE_RESET);
      |                              ^~~~~~~~~~~~~~~~~~~
      |                              HAL_RTC_STATE_RESET
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void ethernetif_set_link(netif*)':
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:509:28: error: 'EthHandle' was not declared in this scope
  509 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ISFR, &regvalue);
      |                            ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:509:39: error: 'PHY_ISFR' was not declared in this scope; did you mean 'PHY_MISR'?
  509 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ISFR, &regvalue);
      |                                       ^~~~~~~~
      |                                       PHY_MISR
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:509:3: error: 'HAL_ETH_ReadPHYRegister' was not declared in this scope
  509 |   HAL_ETH_ReadPHYRegister(&EthHandle, PHY_ISFR, &regvalue);
      |   ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:512:19: error: 'PHY_ISFR_INT4' was not declared in this scope
  512 |   if ((regvalue & PHY_ISFR_INT4) != (uint16_t)RESET) {
      |                   ^~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp: In function 'void ethernetif_update_config(netif*)':
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:542:9: error: 'EthHandle' was not declared in this scope
  542 |     if (EthHandle.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) {
      |         ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:542:43: error: 'ETH_AUTONEGOTIATION_DISABLE' was not declared in this scope
  542 |     if (EthHandle.Init.AutoNegotiation != ETH_AUTONEGOTIATION_DISABLE) {
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:545:7: error: 'HAL_ETH_ReadPHYRegister' was not declared in this scope
  545 |       HAL_ETH_ReadPHYRegister(&EthHandle, PHY_SR, &regvalue);
      |       ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\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\Mathis\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\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:561:32: error: 'ETH_SPEED_10M' was not declared in this scope
  561 |         EthHandle.Init.Speed = ETH_SPEED_10M;
      |                                ^~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:564:32: error: 'ETH_SPEED_100M' was not declared in this scope
  564 |         EthHandle.Init.Speed = ETH_SPEED_100M;
      |                                ^~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:573:7: error: 'HAL_ETH_WritePHYRegister' was not declared in this scope
  573 |       HAL_ETH_WritePHYRegister(&EthHandle, PHY_BCR, ((uint16_t)(EthHandle.Init.DuplexMode >> 3) |
      |       ^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:578:24: error: 'EthHandle' was not declared in this scope
  578 |     HAL_ETH_ConfigMAC(&EthHandle, (ETH_MACInitTypeDef *) NULL);
      |                        ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:578:36: error: 'ETH_MACInitTypeDef' was not declared in this scope; did you mean 'TIM_IC_InitTypeDef'?
  578 |     HAL_ETH_ConfigMAC(&EthHandle, (ETH_MACInitTypeDef *) NULL);
      |                                    ^~~~~~~~~~~~~~~~~~
      |                                    TIM_IC_InitTypeDef
C:\Users\Mathis\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\Mathis\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);
      |     ^~~~~~~~~~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:581:5: error: 'HAL_ETH_Start' was not declared in this scope; did you mean 'HAL_ADC_Start'?
  581 |     HAL_ETH_Start(&EthHandle);
      |     ^~~~~~~~~~~~~
      |     HAL_ADC_Start
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:584:19: error: 'EthHandle' was not declared in this scope
  584 |     HAL_ETH_Stop(&EthHandle);
      |                   ^~~~~~~~~
C:\Users\Mathis\Documents\Arduino\libraries\STM32duino_STM32Ethernet\src\utility\ethernetif.cpp:584:5: error: 'HAL_ETH_Stop' was not declared in this scope; did you mean 'HAL_ADC_Stop'?
  584 |     HAL_ETH_Stop(&EthHandle);
      |     ^~~~~~~~~~~~
      |     HAL_ADC_Stop
exit status 1
Erreur de compilation pour la carte Generic STM32F1 series

I also tried to make a project with Platformio with the same libraries but I get the same errors. Did I miss a configuration somewhere or something to add?

fpistm commented 3 years ago

This library is for STM32 with Ethernet IP not for ethernet shield through SPI. F1 has no Ethernet peripheral.