Since building a new PC I can’t build anything but basic code for a ESPRESSIF8266 device, code that use to work does not compile now and I can’t figure out why…
- PIO seems to be automatically “including” any header file in the SRC directory so if the existing code specifically includes the file it I get redefinition errors but if I compile the code to a Nano it’s fine, it doesn’t automatically add it
- I can’t use the Serial object/class is in a header file anymore. This compiles, uploads and runs (Serial is being used in main.cpp):
This does not (Serial is being used in debug.h)
But again, if I build the Nano version it all works as expected
This is the PlatformIO.ini
[env:d1_mini]
platform = espressif8266
board = d1_mini
upload_protocol = esptool
framework = arduino
lib_ldf_mode = chain+
monitor_speed = 115200
[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
framework = arduino
lib_ldf_mode = chain+
monitor_speed = 115200