Hm that’s weird, the LDF mode is still set to chain (not chain+), and so the dependencies are not detected correctly.
Now lib_ldf_mode = chain+ is removed from platformio.ini. Restore it?
Does this happen with the latest core version? CLI + pio ugprade --dev to update.
tsiselsk@tsiselsk-pc:~/Projects/private/magic_chess_game/eboard$ pio upgrade --dev
Please wait while upgrading PlatformIO ...
PlatformIO has been successfully upgraded to 6.1.6a3
Release notes: https://docs.platformio.org/en/latest/history.html
Warning! Please restart IDE to affect PIO Home changes
Processing * in esp32dev environment
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Building & Uploading...
/home/tsiselsk/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined reference to `setup()'
/home/tsiselsk/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to `loop()'
/home/tsiselsk/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libFrameworkArduino.a(main.cpp.o): in function `loopTask(void*)':
/home/tsiselsk/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:42: undefined reference to `setup()'
/home/tsiselsk/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/tsiselsk/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:48: undefined reference to `loop()'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1
Uploading stage has failed, see errors above. Use `pio test -vvv` option to enable verbose output.
---------------------------------------------------------------- esp32dev:* [ERRORED] Took 13.72 seconds ----------------------------------------------------------------
================================================================================ SUMMARY ================================================================================
Environment Test Status Duration
------------- ------ -------- ------------
esp32dev * ERRORED 00:00:13.717
=============================================================== 1 test cases: 0 succeeded in 00:00:13.717 ===============================================================
#include <unity.h>
void setUp(void) {
// set stuff up here
}
void tearDown(void) {
// clean stuff up here
}
int main( int argc, char **argv) {
UNITY_BEGIN();
UNITY_END();
}
What about lib_ldf_mode = deep+ it is required for decencies deep > 2? For src/ code it compiles without this mode (or deep+ i default?)
No that’s expected since you didn’t place an #include <ArduinoOTA.h> in src/main.cpp. Dependencies which you declare in platformio.ini but never include in your source code will not have their dependencies found properly.
You also placed a #include <ArduinoOTA.h> in the test cases souce code, yes?
Adding #include <ArduinoOTA.h> fixes error in src and test.
For src it looks ok, because for code adding wireless uploads is valid.
But for tests #include <ArduinoOTA.h> is not needed, because wireless upload possibility is not needed for testing.
It means that for test we should add #include <ArduinoOTA.h> only because compilation workaround.
Hmm, trying to find more glance solution