Visual Studio Code path distortion when flash command is sent to bash
Posted: Fri Apr 02, 2021 6:50 pm
Hello,
I am new to C/C++ development in VSC on Windows and I have encountered with to issues so far regarding to flashing my ESP32. First:
This happens if my Settings.json contains this:
If I edit Settings.json so that python path looks like this:
So, the python command is now recognized as the path is no more distorted, but I have not a clue where "C:\Users\MyName\esp\esp-idf\components\esptool_py\esptool\esptool.py" is defined so I cannot edit it so that bash would understand that. Of course, another option would fix the distortion issue but I do not understand what is causing that.
I am new to C/C++ development in VSC on Windows and I have encountered with to issues so far regarding to flashing my ESP32. First:
Code: Select all
> Executing task: C:\Users\MyName\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe C:\Users\MyName\esp\esp-idf\components\esptool_py\esptool\esptool.py -p COM3 -b 460800 --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 VSC_ESP.bin <
/usr/bin/bash: C:UsersMyName.espressifpython_envidf4.2_py3.7_envScriptspython.exe: command not found
The terminal process "C:\cygwin64\bin\bash.exe '-c', 'C:\Users\MyName\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe C:\Users\MyName\esp\esp-idf\components\esptool_py\esptool\esptool.py -p COM3 -b 460800 --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 VSC_ESP.bin'" failed to launch (exit code: 127).
Code: Select all
"idf.pythonBinPathWin": "C:\\Users\\MyName\\.espressif\\python_env\\idf4.2_py3.7_env\\Scripts\\python.exe"
Code: Select all
Executing task: C:/Users/MyName/.espressif/python_env/idf4.2_py3.7_env/Scripts/python.exe C:\Users\MyName\esp\esp-idf\components\esptool_py\esptool\esptool.py -p COM3 -b 460800 --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 VSC_ESP.bin <
C:\Users\MyName\AppData\Local\Programs\Python\Python37\python.exe: can't open file 'C:UsersMyNameespesp-idfcomponentsesptool_pyesptoolesptool.py': [Errno 2] No such file or directory
The terminal process "C:\cygwin64\bin\bash.exe '-c', 'C:/Users/MyName/.espressif/python_env/idf4.2_py3.7_env/Scripts/python.exe C:\Users\MyName\esp\esp-idf\components\esptool_py\esptool\esptool.py -p COM3 -b 460800 --after hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size detect 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 VSC_ESP.bin'" terminated with exit code: 2.