stm32duino / STM32Ethernet

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

Error compiling on Arduino IDE #52

Closed sstaub closed 3 years ago

sstaub commented 3 years ago

When compiling with Arduino IDE, I get following errors:

Arduino: 1.8.13 (Mac OS X), Board: "Nucleo-144, Nucleo F207ZG, Mass Storage, Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"

/Users/sstaub/Documents/Arduino/libraries/STM32Ethernet-master/src/utility/ethernetif.cpp: In function 'void low_level_init(netif*)':
/Users/sstaub/Documents/Arduino/libraries/STM32Ethernet-master/src/utility/ethernetif.cpp:184:31: error: 'LAN8742A_PHY_ADDRESS' was not declared in this scope
  184 |   EthHandle.Init.PhyAddress = LAN8742A_PHY_ADDRESS;
      |                               ^~~~~~~~~~~~~~~~~~~~
/Users/sstaub/Documents/Arduino/libraries/STM32Ethernet-master/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
/Users/sstaub/Documents/Arduino/libraries/STM32Ethernet-master/src/utility/ethernetif.cpp:225:15: error: 'PHY_ISFR_INT4' was not declared in this scope
  225 |   regvalue |= PHY_ISFR_INT4;
      |               ^~~~~~~~~~~~~
/Users/sstaub/Documents/Arduino/libraries/STM32Ethernet-master/src/utility/ethernetif.cpp: In function 'void ethernetif_set_link(netif*)':
/Users/sstaub/Documents/Arduino/libraries/STM32Ethernet-master/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
/Users/sstaub/Documents/Arduino/libraries/STM32Ethernet-master/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) {
      |                   ^~~~~~~~~~~~~
exit status 1
Error compiling for board Nucleo-144.

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

Using PlatformIO I have no problems.

sstaub commented 3 years ago

However it works now.