So i updated ESP-IDF to 4.3.1. I created a completly new project with platformIO. Than i tried the following steps:
- I copied the the whole ESP-IDF example into the platformIO project folder
- i added
[platformio]src_dir=main
to the platformio.ini file and deletet the src folder
- I changed the project name in the CMake file in the root folder to the name of the platformio project (same as name of root folder)
- I changed the project name in the CMake file in the main folder to the name of the platformio project (same as name of root folder)
If I built this project with the ESP-IDF CMD it compiles it succesfull.
If I try to built it with the PlatformIO built in VS Code i receive the following output:
> Executing task in folder esp-modbus-test: C:\.platformio\penv\Scripts\platformio.exe run <
Processing esp32dev (platform: espressif32; board: esp32dev; framework: espidf)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (3.4.0) > 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-espidf 3.40301.0 (4.3.1)
- tool-cmake 3.16.4
- tool-esptoolpy 1.30100.210531 (3.1.0)
- tool-idf 1.0.1
- tool-mconf 1.4060000.20190628 (406.0.0)
- tool-ninja 1.9.0
- toolchain-esp32ulp 1.22851.191205 (2.28.51)
- toolchain-riscv32-esp 8.4.0+2021r1
- toolchain-xtensa-esp32 8.4.0+2021r1
- toolchain-xtensa-esp32s2 8.4.0+2021r1
Reading CMake configuration...
KeyError: 'compileGroups':
File "C:\.platformio\penv\Lib\site-packages\platformio\builder\main.py", line 180:
env.SConscript("$BUILD_SCRIPT")
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Script\SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Script\SConscript.py", line 285:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\.platformio\platforms\espressif32\builder\main.py", line 233:
target_elf = env.BuildProgram()
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Util.py", line 748:
return self.method(*nargs, **kwargs)
File "C:\.platformio\penv\Lib\site-packages\platformio\builder\tools\platformio.py", line 61:
env.ProcessProgramDeps()
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Util.py", line 748:
return self.method(*nargs, **kwargs)
File "C:\.platformio\penv\Lib\site-packages\platformio\builder\tools\platformio.py", line 128:
env.BuildFrameworks(env.get("PIOFRAMEWORK"))
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Util.py", line 748:
return self.method(*nargs, **kwargs)
File "C:\.platformio\penv\Lib\site-packages\platformio\builder\tools\platformio.py", line 343:
SConscript(env.GetFrameworkScript(f), exports="env")
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Script\SConscript.py", line 660:
return method(*args, **kw)
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Script\SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\.platformio\packages\tool-scons\scons-local-4.2.0\SCons\Script\SConscript.py", line 285:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\.platformio\platforms\espressif32\builder\frameworks\espidf.py", line 1227:
project_flags = get_app_flags(project_config, default_config)
File "C:\.platformio\platforms\espressif32\builder\frameworks\espidf.py", line 406:
default_flags = _extract_flags(default_config)
File "C:\.platformio\platforms\espressif32\builder\frameworks\espidf.py", line 393:
for cg in config["compileGroups"]:
===================================================================================== [FAILED] Took 9.52 seconds =====================================================================================
The terminal process "C:\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
What do i have to to that i can built it with the platformio built command?