platform-espressif32: ESP32 - Cannot find libhal on VS Code

I try to compile an espidf / Arduino project with PlatformIO (v2.3.4) and VS Code (1.61.2) on a Windows OS (10) and I got this error during the linking stage:

Tool Manager: Installing tool-mkspiffs @ ~2.230.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: tool-mkspiffs @ 2.230.0 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (1.12.4) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 0.0.0+sha.3616c2e
 - framework-espidf 3.40001.200521 (4.0.1)
 - tool-cmake 3.16.4
 - tool-esptoolpy 1.20600.0 (2.6.0)
 - tool-idf 1.0.1
 - tool-mconf 1.4060000.20190628 (406.0.0)
 - tool-mkspiffs 2.230.0 (2.30)
 - tool-ninja 1.9.0
 - toolchain-esp32ulp 1.22851.191205 (2.28.51)
 - toolchain-xtensa32 3.80200.200512 (8.2.0)
Reading CMake configuration...
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 2 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ArduinoJson> 6.18.5
|-- <RAK3172> 1.5.0+sha.d36577e
Building in debug mode
Linking .pio\build\debug\bootloader.elf
.../.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -l....platformiopackagesframework-espidfcomponentsxtensaesp32libhal
collect2.exe: error: ld returned 1 exit status
Archiving .pio\build\debug\lib031\libRAK3172.a
*** [.pio\build\debug\bootloader.elf] Error 1
Indexing .pio\build\debug\lib031\libRAK3172.a
=========================================================== [FAILED] Took 15.08 seconds ===========================================================
Der Terminalprozess "...\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" wurde mit folgendem Exitcode beendet: 1.

It looks like that the path for the linker isn“t resolved correctly.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@MLStoltzenburg toolchain-xtensa32 @ 2.80400.210211 is to old when you use Arduino framework based on IDF4.x Use the actual toolchains 8.4.0+2021r1 for. Your setup is problematic in general. Arduino ESP32 does only support IDF4.4 as underlying base. You should rethink / refactor your setup