[Bug Report]: Cannot open monitor using WSL2 with project in windows folder (VSC-822)
See original GitHub issueDescribe the bug Cannot use monitor on WSL2 while the project is in windows folder, the powershell outputs the “No such file or directory” error. The build and flash executes successfully, but opening monitor fails. These are the lines from terminal:
export WSLENV=IDF_PATH/p
powershell.exe -Command "python \\\\wsl$\\Ubuntu\\home\\fronders\\esp\\esp-idf\\tools\\idf_monitor.py -p COM6 /mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board/build/techmaker-board.elf"
fronders > /mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board > export WSLENV=IDF_PATH/p
fronders > /mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board > powershell.exe -Command "python \\\\wsl$\\Ubuntu\\home\\fronders\\esp\\esp-idf\\tools\\idf_monitor.py -p COM6 /mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board/build/techmaker-board.elf"
usage: idf_monitor - a serial output monitor for esp-idf [-h] [--port PORT] [--disable-address-decoding] [--baud BAUD] [--make MAKE] [--encrypted]
[--toolchain-prefix TOOLCHAIN_PREFIX] [--eol {CR,LF,CRLF}] [--print_filter PRINT_FILTER]
[--decode-coredumps {info,disable}] [--decode-panic {backtrace,disable}] [--target TARGET] [--ws WS]
elf_file
idf_monitor - a serial output monitor for esp-idf: error: argument elf_file: can't open '/mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board/build/techmaker-board.elf': [Err
no 2] No such file or directory: '/mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board/build/techmaker-board.elf'
However it successfully opens monitor for project in wsl home folder:
export WSLENV=IDF_PATH/p
powershell.exe -Command "python \\\\wsl$\\Ubuntu\\home\\fronders\\esp\\esp-idf\\tools\\idf_monitor.py -p COM6 /home/fronders/esp/template-app/build/template-app.elf"
fronders > ~/esp/template-app > export WSLENV=IDF_PATH/p
fronders > ~/esp/template-app > powershell.exe -Command "python \\\\wsl$\\Ubuntu\\home\\fronders\\esp\\esp-idf\\tools\\idf_monitor.py -p COM6 /home/fronders/esp/template-app/build/template-app.elf"
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM6 instead...
--- idf_monitor on \\.\COM6 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7008
load:0x40078000,len:14308
Environment (please complete the following information):
- OS Name & Version: Windows 10 x64 21H1 build 19043.1466 using WSL2 Ubuntu 20 (OS linux x64 5.10.60.1-microsoft-standard-WSL2)
- VSCode Version: 1.63.2
- ESP-IDF extension version 1.3.0
- ESP-IDF version 4.3.1
- Python version 3.8.10
Output Build and Flash are successfull:
> Executing task: ninja <
[1/8] Performing build step for 'bootloader'
ninja: no work to do.
[6/6] Generating binary image from built executable
esptool.py v3.1-dev
Merged 2 ELF sections
Generated /mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board/build/techmaker-board.bin
> Executing task: /home/fronders/.espressif/python_env/idf4.3_py3.8_env/bin/python /home/fronders/esp/esp-idf/tools/idf_size.py /mnt/c/Users/alexa/Repo/techmaker-board/techmaker-board/build/techmaker-board.map <
Total sizes:
DRAM .data size: 10768 bytes
DRAM .bss size: 37288 bytes
Used static DRAM: 48056 bytes ( 132680 available, 26.6% used)
Used static IRAM: 63330 bytes ( 67742 available, 48.3% used)
Flash code: 296903 bytes
Flash rodata: 66336 bytes
Total image size:~ 437337 bytes (.bin may be padded larger)
> Executing task: powershell.exe -Command "python \\\\wsl$\\Ubuntu\\home\\fronders\\esp\\esp-idf\\components\\esptool_py\\esptool\\esptool.py -p COM6 -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 80m --flash_size detect 0x20000 techmaker-board.bin 0x1000 bootloader\bootloader.bin 0x8000 partition_table\partition-table.bin 0xf000 ota_data_initial.bin" <
esptool.py v3.1-dev
Serial port COM6
Connecting.....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:71:bf:5a:27:dc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00020000 to 0x0008afff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000f000 to 0x00010fff...
Compressed 437728 bytes to 266652...
Wrote 437728 bytes (266652 compressed) at 0x00020000 in 4.1 seconds (effective 850.0 kbit/s)...
Hash of data verified.
Compressed 18768 bytes to 12533...
Wrote 18768 bytes (12533 compressed) at 0x00001000 in 0.4 seconds (effective 368.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 156...
Wrote 3072 bytes (156 compressed) at 0x00008000 in 0.1 seconds (effective 438.9 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 31...
Wrote 8192 bytes (31 compressed) at 0x0000f000 in 0.1 seconds (effective 682.7 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Extension Configuration settings ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH} ESP-IDF Path (idf.espIdfPath) /home/fronders/esp/esp-idf ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH} Custom extra paths (idf.customExtraPaths) /home/fronders/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin:/home/fronders/.espressif/tools/xtensa-esp32s2-elf/esp-2021r1-8.4.0/xtensa-esp32s2-elf/bin:/home/fronders/.espressif/tools/xtensa-esp32s3-elf/esp-2021r1-8.4.0/xtensa-esp32s3-elf/bin:/home/fronders/.espressif/tools/riscv32-esp-elf/esp-2021r1-8.4.0/riscv32-esp-elf/bin:/home/fronders/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin:/home/fronders/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin:/home/fronders/.espressif/tools/cmake/3.16.4/bin:/home/fronders/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/bin:/home/fronders/.espressif/tools/ninja/1.10.2 Custom extra vars (idf.customExtraVars) {“OPENOCD_SCRIPTS”:“/home/fronders/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/share/openocd/scripts”} Virtual env Python Path (idf.pythonBinPath) /home/fronders/.espressif/python_env/idf4.3_py3.8_env/bin/python Serial port (idf.port) COM6 OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg ESP-IDF Tools Path (idf.toolsPath) /home/fronders/.espressif Git Path (idf.gitPath) /usr/bin/git
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top GitHub Comments
I added the Flash type in the status bar and make so flash type is saved in workspace folder in this vsix installer, could you please take a look ?
Thanks for your suggestion @fronders !
Should be saved based on the value by
idf.saveScope