platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.23k stars 196 forks source link

Build error "unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe': No child processes" #734

Closed HouzuoGuo closed 5 years ago

HouzuoGuo commented 5 years ago

Over here I got a fresh installation of Arduino IDE, VSCode, and Platform IO plugin. Upon creation of a new project using board model "TTGO T-Beam", the IDE plugin is unable to compile the minimal main.cpp with empty setup and loop function. Terminal output shows:

> Executing task in folder tbeam-pio: C:\Users\Houzuo Guo\.platformio\penv\Scripts\platformio.exe run <

Processing ttgo-t-beam (platform: espressif32; board: ttgo-t-beam; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/ttgo-t-beam.html
PLATFORM: Espressif 32 > TTGO T-Beam
HARDWARE: ESP32 240MHz 1.25MB 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)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 26 compatible libraries
Scanning dependencies...
No dependencies
Compiling .pioenvs\ttgo-t-beam\src\main.cpp.o
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe': No child processes
Generating partitions .pioenvs\ttgo-t-beam\partitions.bin
Archiving .pioenvs\ttgo-t-beam\libFrameworkArduinoVariant.a
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe /C ""c:\users\houzuo guo\.platformio\penv\scripts\python.exe" "C:\Users\Houzuo Guo\.platformio\packages\framework-arduinoespressif32\tools\gen_esp32part.py" -q "C:\Users\Houzuo Guo\.platformio\packages\framework-arduinoespressif32\tools\partitions\default.csv" ".pioenvs\ttgo-t-beam\partitions.bin""': No child processes
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe /C "xtensa-esp32-elf-ar rc ".pioenvs\ttgo-t-beam\libFrameworkArduinoVariant.a""': No child processes
Compiling .pioenvs\ttgo-t-beam\FrameworkArduino\Esp.cpp.o
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe': No child processes
Compiling .pioenvs\ttgo-t-beam\FrameworkArduino\FunctionalInterrupt.cpp.o
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe': No child processes
Compiling .pioenvs\ttgo-t-beam\FrameworkArduino\HardwareSerial.cpp.o
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe': No child processes
Compiling .pioenvs\ttgo-t-beam\FrameworkArduino\IPAddress.cpp.o
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe': No child processes
Compiling .pioenvs\ttgo-t-beam\FrameworkArduino\IPv6Address.cpp.o
*** [.pioenvs\ttgo-t-beam\src\main.cpp.o] Error 127
*** [.pioenvs\ttgo-t-beam\partitions.bin] Error 127
*** [.pioenvs\ttgo-t-beam\libFrameworkArduinoVariant.a] Error 127
*** [.pioenvs\ttgo-t-beam\FrameworkArduino\Esp.cpp.o] Error 127
*** [.pioenvs\ttgo-t-beam\FrameworkArduino\FunctionalInterrupt.cpp.o] Error 127
*** [.pioenvs\ttgo-t-beam\FrameworkArduino\HardwareSerial.cpp.o] Error 127
*** [.pioenvs\ttgo-t-beam\FrameworkArduino\IPAddress.cpp.o] Error 127
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe': No child processes
*** [.pioenvs\ttgo-t-beam\FrameworkArduino\IPv6Address.cpp.o] Error 127
=================================================== [ERROR] Took 2.10 seconds ===================================================
The terminal process terminated with exit code: 1

It almost seems that the IDE was launching commands in wrong working directory, as I am able to successfully execute the long command manually in project's top level directory. The command runs successfully and generates empty output:

C:\Windows\System32\cmd.exe /C ""c:\users\houzuo guo\.platformio\penv\scripts\python.exe" "C:\Users\Houzuo Guo\.platformio\packages\framework-arduinoespressif32\tools\gen_esp32part.py" -q "C:\Users\Houzuo Guo\.platformio\packages\framework-arduinoespressif32\tools\partitions\default.csv" ".pioenvs\ttgo-t-beam\partitions.bin""': No child processes
unknown OSError exception code 10 - 'C:\Windows\System32\cmd.exe /C "xtensa-esp32-elf-ar rc ".pioenvs\ttgo-t-beam\libFrameworkArduinoVariant.a""
ivankravets commented 5 years ago

Duplicate of https://github.com/platformio/platformio-vscode-ide/issues/735