Hi,
I have a number of ESP8266 projects. These have all been building and deploying wonderfully under the previous version of PIO.
Got prompted to update on Friday. The moment the update completed the agony began - none of my projects would compile anymore. Have been tearing out my hair all weekend
Specifics - using ESPAsyncUDP, ESPAsyncTCP, ESPAsync web server etc on a Windows 10 PIO environment, customised to use github arduino/ESP8266 core. NOTE: it took some time to set up the environment, but all projects were building perfectly.
Tried complete removal of PIO and Atom and fresh install, re-did all my steps to download latest version of libraries, github version of ESP8266 Arduino core, tried all the platformio.ini tweaks. Nothing.
So, tried the most basic test:
- Install from fresh (full delete and clean of all Atom/PIO data and directories, set up new project in fresh directory etc
- Install github version of the ESP8266 core (master branch)
- Install latest version of the ESPAsyncUDP library
- Create platform.ini file with:
[env:d1_mini]
platform = espressif8266
framework = arduino
board = d1_mini
build_flags = -ULWIP_OPEN_SRC -I$PLATFORMFW_DIR/tools/sdk/libc/xtensa-lx106-elf/include -IL$PLATFORMFW_DIR/tools/sdk/libc/xtensa-lx106-elf/lib -lc
- Try to build the example asyncudpclient
If I use the -ULWIP_OPEN_SRC flag, I get lots of errors like:
In file included from C:\users\MrFusion.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/inet.h:37:0,
from .piolibdeps\ESPAsyncUDP_ID359\src\AsyncUDP.cpp:7:
C:\users\MrFusion.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/ip_addr.h:96:0: warning: āIPADDR_NONEā redefined [enabled by default]
#define IPADDR_NONE ((u32_t)0xffffffffUL)
and
In file included from C:\users\MrFusion.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/inet.h:37:0,
from .piolibdeps\ESPAsyncUDP_ID359\src\AsyncUDP.cpp:7:
C:\users\MrFusion.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip\include/lwip/ip_addr.h:44:8: error: redefinition of 'struct ip_addrā
struct ip_addr {
^
If I use the -DLWIP_OPEN_SRC option I get lots of these sorts of errors:
pioenvs\d1_mini\libFrameworkArduino.a(heap.o): In function
_malloc_r': heap.c:(.text._malloc_r+0x4): multiple definition of
_malloc_rā
mallocr.c:(.text+0x44): undefined reference to_sbrk_r' mallocr.c:(.text+0x56): undefined reference to
_sbrk_rā
Sadly, if I follow the instructions to use the Arduino IDE with github core it all works perfectly!! And note (I might have mentioned this before ) - it all worked perfectly in PIO before the upgradeā¦
Can anyone please please please shed some light on this - itās driving me mad!!
Any hints on how to get this working would be marvellous.
Ideally, you could show me how you got ESPAsyncUDP example built!