What just happened?

I’ve got several projects, using ESP8266 and ESP32, that use ‘ino’ instead of ‘cpp’. They compile without any problems with Arduino IDE or PlatformIO… well, they USED to compile with PlatformIO. I shutdown the PC for Thanksgiving to visit the relatives. When I returned and booted the PC, all of the projects give these errors:

/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:18: undefined reference to `setup()’

/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:21: undefined reference to `loop()’


Error: Nothing to build. Please put your source code files to ‘./source’ folder

…depending on if I’m ‘building’ or ‘uploading’.

One project I’d been working on, now can’t find ‘SPI.h’.

I guess it’s no longer processing the ‘ino’ files? or something? Did I lose an ENV variable with the reboot? Did some deprecation finally expire and become ‘not allowed’? What’s going on?

EDIT: OK, found the problem. At the top of platformio.ini, I have this:

name = gamma

src_dir = ${proj.name}
default_envs = default

That worked Before Thanksgiving (BT). Now it generates this error:

Building in release mode
*** [.pio/build/default/src/gamma.cpp.o] Source `/home/dev/.platformio/platforms/espressif32/builder/gamma/gamma.cpp' not found, needed by target `.pio/build/default/src/gamma.cpp.o'.

…so it’s looking for the source under the builder directory, not the project directory. Changing that to:

src_dir = gamma

and it works fine. Strange, src_dir = gamma is no longer the same as src_dir = ${proj.name} ?

Finally, changing it to:

src_dir = $PROJECT_DIR/${proj.name}

…and it works the way it did BT. Seems like a bug…