How can i to modify the folder path of .platformio

there have a quesstion-> when i finish platformio installed with vscode, that create a new folder “.platformio” at %userprofile% path, this path is in c: driver (my os win10), how can i to modify this path
move %userprofile% /.paltformio/ from c : driver to other driver(d: e: and so on…) tks.

You could try setting core_dir as per Redirecting.... But that would be needed in all projects.

Probably best to do this before downloading frameworks, toolchains etc.

Alternatively, uninstall first, set the environment variable PLATFORMIO_CORE_DIR and reinstall.

This would need tobe a permanent setting, otherwise you are back needing core_dir in your projects again.

See Environment variables — PlatformIO latest documentation for details of all the environment variables you can use.


thank u,i have follow the step of u mentioned, the operation sequence as below 1.) uninstall platformio extensions 2.)removed the forders of these path “%HOMEPATH%.vscode\extensions\platformio.platformio-ide-2.2.1” and “%HOMEPATH%.platformio” 3.) seting system environment variable “PLATFORMIO_CORE_DIR=D:\CodeDeveloper\Platformio” 4.) uninstall Visual Studio Code then restart computer when finished uninstall. 5.) removed "%HOMEPATH%.vscode" forder. 6.) install Visual Studio Code 7.) install extensions of platformio ide in vscode
8.) install embedded platform espressif32 in vscode of platformio extensions. 9.) finally create a new project. but In this step, that can not be correctly create a new project and vscode show error message just like this -------->

PIO Core Call Error: “The current working directory E:\Embed\PlatformIO\ESP32\ttnnggf will be used for the project.\r\n\r\nThe next files/directories have been created in E:\Embed\PlatformIO\ESP32\ttnnggf\r\ninclude - Put project header files here\r\nlib - Put here project specific (private) libraries\r\nsrc - Put project source files here\r\nplatformio.ini - Project Configuration File\r\n\n\nError: Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: espidf)\r\n--------------------------------------------------------------------------------\r\nTool Manager: Installing platformio/toolchain-xtensa32 @ ~2.80400.0\r\nTool Manager: toolchain-xtensa32 @ 2.80400.210211 has been installed!\r\nTool Manager: Installing platformio/toolchain-esp32ulp @ ~1.22851.0\r\nTool Manager: toolchain-esp32ulp @ 1.22851.191205 has been installed!\r\nTool Manager: Installing platformio/framework-espidf @ ~3.40200.0\r\nTool Manager: framework-espidf @ 3.40200.210118 has been installed!\r\nTool Manager: Installing platformio/tool-cmake @ ~3.16.0\r\nTool Manager: tool-cmake @ 3.16.4 has been installed!\r\nTool Manager: Installing platformio/tool-ninja @ ^1.7.0\r\nTool Manager: tool-ninja @ 1.9.0 has been installed!\r\nTool Manager: Installing platformio/tool-mconf @ ~1.4060000.0\r\nTool Manager: tool-mconf @ 1.4060000.20190628 has been installed!\r\nTool Manager: Installing platformio/tool-idf @ ~1.0.1\r\nTool Manager: tool-idf @ 1.0.1 has been installed!\r\nTool Manager: Installing platformio/tool-scons @ ~4.40100.2\r\nTool Manager: tool-scons @ 4.40100.2 has been installed!\r\nVerbose mode can be enabled via -v, --verbose option\r\nCONFIGURATION:\r\nPLATFORM: Espressif 32 (3.0.0) > DOIT ESP32 DEVKIT V1\r\nHARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash\r\nDEBUG: 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)\r\nPACKAGES: \r\n - framework-espidf 3.40200.210118 (4.2.0) \r\n - tool-cmake 3.16.4 \r\n - tool-esptoolpy 1.30000.201119 (3.0.0) \r\n - tool-idf 1.0.1 \r\n - tool-mconf 1.4060000.20190628 (406.0.0) \r\n - tool-ninja 1.9.0 \r\n - toolchain-esp32ulp 1.22851.191205 (2.28.51) \r\n - toolchain-xtensa32 2.80400.210211 (8.4.0)\r\nInstalling ESP-IDF’s Python dependencies\r\nCollecting cryptography>=2.1.4\r\n Using cached cryptography-3.4.6-cp36-abi3-win_amd64.whl (1.6 MB)\r\nCollecting future>=0.15.2\r\n Using cached future-0.18.2-py3-none-any.whl\r\nCollecting pyparsing<2.4.0,>=2.0.3\r\n Using cached pyparsing-2.3.1-py2.py3-none-any.whl (61 kB)\r\nCollecting cffi>=1.12\r\n Using cached cffi-1.14.5-cp37-cp37m-win_amd64.whl (178 kB)\r\nCollecting pycparser\r\n Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)\r\nInstalling collected packages: pycparser, cffi, pyparsing, future, cryptography\r\nSuccessfully installed cffi-1.14.5 cryptography-3.4.6 future-0.18.2 pycparser-2.20 pyparsing-2.3.1\r\nInstalling windows-curses package\r\nProcessing d:\codedeveloper\platformio\packages\framework-espidf\tools\kconfig_new\esp-windows-curses\r\nCollecting windows-curses\r\n Using cached windows_curses-2.2.0-cp37-cp37m-win_amd64.whl (70 kB)\r\nBuilding wheels for collected packages: esp-windows-curses\r\n Building wheel for esp-windows-curses ( started\r\n Building wheel for esp-windows-curses ( finished with status ‘done’\r\n Created wheel for esp-windows-curses: filename=esp_windows_curses-0.1-py3-none-any.whl size=1170 sha256=dbf70f333ea3ed2d87b585e045183a6599c999ef4c9be82f3e15af328876d565\r\n Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\45\95\62\be4f6e51658f35c50e858ab580290dc19a4796716528d6dd4b\r\nSuccessfully built esp-windows-curses\r\nInstalling collected packages: windows-curses, esp-windows-curses\r\nSuccessfully installed esp-windows-curses-0.1 windows-curses-2.2.0\r\nReading CMake configuration…\r\n\r\n*** Multiple ways to build the same target were specified for: E:\Embed\PlatformIO\ESP32\ttnnggf\.pio\build\esp32doit-devkit-v1\esp_efuse_api.o (from [‘D:\\codedeveloper\\platformio\\packages\\framework-espidf\\components\\efuse\\src\\esp32\\esp_efuse_api.c’] and from [‘D:\\codedeveloper\\platformio\\packages\\framework-espidf\\components\\efuse\\src\\esp_efuse_api.c’])\r\nFile "D:\codedeveloper\platformio\platforms\espressif32\builder\frameworks\", line 609, in compile_source_files\r\n========================= [FAILED] Took 932.51 seconds =========================”

Cross-Posted to Create a new project Error in platfromio ide with vscode! When modify the folder path of .platformio from "%HOMEPATH%\.platfromio" to Specified path.