Closed dm5xx closed 2 years ago
Hi @dm5xx
Thanks for your interest in the library.
I just test compile the example HelloServer on F103C8 and still OK using Arduino IDE.
I suggest you try to use Arduino IDE first. Then move on to PIO when everything is OK.
PIO is still not mature enough for complex use cases, and requires much more knowledge / skills to manually modify the settings.
Post for help in PIO Forum if you still have problem.
I'm closing the issue now, because I just compiled and OK here.
.pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:184:31: error: 'LAN8742A_PHY_ADDRESS' was not declared in this scope 184 | EthHandle.Init.PhyAddress = LAN8742A_PHY_ADDRESS;
Another note is that LAN8742A
can be only used for some STM32F7 (Nucleo-144 F767ZI, etc.), , etc. as built-in Ethernet.
Now you can only use W5x00 or ENC28J60 for STM31F1, F4.
STM32F1, F4, etc. can't use LAN8742A
yet.
Even support to LAN8720
and STM32F4 recently was broken with new STM32 core v2.3.0. I'm not interested in finding out why and had to drop the support to LAN8720
;={{
If necessary, use the STM32 core v2.2.0 or STM32 core v2.1.0 for LAN8720
Be sure to use in your code before includion of EthernetWebServer_STM32
#define USE_BUILTIN_ETHERNET false
...
#include <EthernetWebServer_STM32.h>
Describe the bug
Its impossible to build because of build is broken. Build log is full of errors like
.pio\libdeps\STM32\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 / | ^
~~~~~ .pio\libdeps\STM32\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 /Looking into ehternetif.cpp => Its almost completly red
Steps to Reproduce
Set up Visual Code as described, use this ini and build.
[platformio] default_envs = STM32
[env] upload_speed = 921600
lib_compat_mode = strict lib_ldf_mode = chain+ ;lib_ldf_mode = deep+
lib_deps = stm32duino/STM32duino LwIP@~2.1.2 stm32duino/STM32Ethernet@~1.3.0 khoih-prog/Functional-Vlpp@~1.0.2 khoih-prog/Ethernet_Generic@~2.2.0 uipethernet/UIPEthernet@~2.0.11 jandrassy/EthernetENC@~2.0.2
[env:STM32] platform = ststm32 framework = arduino board = bluepill_f103c8
Expected behavior
Build should be possible and all is running fine again :)
Actual behavior
Its dead jim.
Debug and AT-command log (if applicable)
Compiling .pio\build\STM32\lib3c6\STM32Ethernet\utility\stm32_eth.cpp.o .pio\libdeps\STM32\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 / | ^
~~~~~ .pio\libdeps\STM32\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\matrixxx.platformio\packages\framework-arduinoststm32\system\STM32F1xx/stm32f1xx_hal_conf.h:13, from C:\Users\matrixxx.platformio\packages\framework-arduinoststm32\system\Drivers\STM32F1xx_HAL_Driver\Inc/stm32f1xx_hal.h:30, from C:\Users\matrixxx.platformio\packages\framework-arduinoststm32\system\Drivers\CMSIS\Device\ST\STM32F1xx\Include/stm32f1xx.h:255, from C:\Users\matrixxx.platformio\packages\framework-arduinoststm32\cores\arduino\stm32/stm32_def.h:28, from .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:48: C:\Users\matrixxx.platformio\packages\framework-arduinoststm32\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 / | ^~~~~~~ .pio\libdeps\STM32\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\matrixxx.platformio\packages\framework-arduinoststm32\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 / | ^~~~~~~ .pio\libdeps\STM32\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 / | ^~~~~~~ .pio\libdeps\STM32\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 .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:116:22: error: variable or field 'HAL_ETH_MspInit' declared void116 | void HAL_ETH_MspInit(ETH_HandleTypeDef heth) | ^
~~~~ .pio\libdeps\STM32\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 .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:116:41: error: 'heth' was not declared in this scope 116 | void HAL_ETH_MspInit(ETH_HandleTypeDef heth) | ^~~~ .pio\libdeps\STM32\STM32Ethernet\src\utility\stm32_eth.cpp:67:4: warning: #warning "Default timer used to call ethernet scheduler at regular interval: TIM14" [-Wcpp] 67 | #warning "Default timer used to call ethernet scheduler at regular interval: TIM14" | ^~~ .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp: In function 'void low_level_init(netif)': .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:168:3: error: 'EthHandle' was not declared in this scope 168 | EthHandle.Instance = ETH; | ^~~~~ .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:168:24: error: 'ETH' was not declared in this scope 168 | EthHandle.Instance = ETH; | ^~~ .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:170:36: error: 'ETH_AUTONEGOTIATION_ENABLE' was not declared in this scope 170 | EthHandle.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE; | ^~~~~~.pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:171:26: error: 'ETH_SPEED_100M' was not declared in this scope 171 | EthHandle.Init.Speed = ETH_SPEED_100M; | ^~~~~~ .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:172:31: error: 'ETH_MODE_FULLDUPLEX' was not declared in this scope 172 | EthHandle.Init.DuplexMode = ETH_MODE_FULLDUPLEX; | ^~~~~~~ .pio\libdeps\STM32\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; | ^~~~~~~~ .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:181:27: error: 'ETH_RXPOLLING_MODE' was not declared in this scope181 | EthHandle.Init.RxMode = ETH_RXPOLLING_MODE; | ^
~~~~~ .pio\libdeps\STM32\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 .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:184:31: error: 'LAN8742A_PHY_ADDRESS' was not declared in this scope184 | EthHandle.Init.PhyAddress = LAN8742A_PHY_ADDRESS; | ^
~~~~~~~ .pio\libdeps\STM32\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 .pio\libdeps\STM32\STM32Ethernet\src\utility\ethernetif.cpp:193:41: error: 'DMATxDscrTab' was not declared in this scope Compiling .pio\build\STM32\src\main.cpp.o 193 | HAL_ETH_DMATxDescListInit(&EthHandle, DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); | ^~~~~Compiling .pio\build\STM32\libc4e\STM32duino LwIP\api\api_lib.c.o