Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't change port on macos (VSC-1330) #1166

Closed
1 task done
mianos opened this issue Mar 21, 2024 · 4 comments · Fixed by #1167
Closed
1 task done

can't change port on macos (VSC-1330) #1166

mianos opened this issue Mar 21, 2024 · 4 comments · Fixed by #1167
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)

Comments

@mianos
Copy link

mianos commented Mar 21, 2024

OS

MacOS

Operating System version

Sonoma 14.4

Visual Studio Code version

1.87.2

ESP-IDF version

v5.2.1

Python version

3.11.7

Doctor command output

---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS darwin x64 23.4.0
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
/.local/adb:/usr/local/opt/llvm/bin:/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin
System environment variable PYTHON
undefined
Visual Studio Code version 1.87.2
Visual Studio Code language en
Visual Studio Code shell /bin/bash
ESP-IDF Extension version 1.7.0
Workspace folder /wa/ETM/gptimer_capture_hc_sr04
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) /esp/v5.2.1/esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
Custom extra paths (idf.customExtraPaths) /.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin:/.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin:/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin:/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin:/.espressif/tools/esp-rom-elfs/20230320
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts
ESP_ROM_ELF_DIR: /.espressif/tools/esp-rom-elfs/20230320/
Virtual env Python Path (idf.pythonBinPath) /.espressif/python_env/idf5.2_py3.11_env/bin/python
Serial port (idf.port) /dev/tty.wchusbserial57350193411
OpenOCD Configs (idf.openOcdConfigs) board/esp32c6-ftdi.cfg
ESP-IDF Tools Path (idf.toolsPath) /.espressif
Git Path (idf.gitPath) git
Notification Mode (idf.notificationMode) All
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-IDF Custom extra paths
Access to /.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin: true
Access to /.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin: true
Access to /.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: true
Access to /.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: true
Access to /.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: true
Access to /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin: true
Access to /.espressif/tools/esp-rom-elfs/20230320: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH true
Access to Ninja in environment PATH true
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path false
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in /.espressif/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin: false
Spaces in /.espressif/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin: false
Spaces in /.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin: false
Spaces in /.espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin: false
Spaces in /.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: false
Spaces in /.espressif/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin: false
Spaces in /.espressif/tools/esp-rom-elfs/20230320: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.43.0
ESP-IDF version 5.2.1
Python version 3.11.7
Python's pip version 24.0
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.9.2
bitstring version: 4.1.4
CacheControl version: 0.14.0
certifi version: 2024.2.2
cffi version: 1.16.0
charset-normalizer version: 3.3.2
click version: 8.0.4
colorama version: 0.4.6
construct version: 2.10.70
contextlib2 version: 21.6.0
cryptography version: 41.0.7
ecdsa version: 0.18.0
esp-coredump version: 1.10.0
esp-debug-backend version: 1.0.3
esp-idf-kconfig version: 1.4.2
esp-idf-monitor version: 1.4.0
esp-idf-panic-decoder version: 1.0.1
esp-idf-size version: 1.2.0
esptool version: 4.7.0
filelock version: 3.13.1
freertos-gdb version: 1.0.3
idf-component-manager version: 1.5.2
idna version: 3.6
intelhex version: 2.3.0
kconfiglib version: 14.1.0
markdown-it-py version: 3.0.0
mdurl version: 0.1.2
msgpack version: 1.0.8
packaging version: 24.0
pip version: 24.0
pyclang version: 0.4.2
pycparser version: 2.21
pyelftools version: 0.31
pygdbmi version: 0.9.0.2
Pygments version: 2.17.2
pyparsing version: 3.1.2
pyserial version: 3.5
PyYAML version: 6.0.1
reedsolo version: 1.7.0
requests version: 2.31.0
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
rich version: 13.7.1
schema version: 0.7.5
setuptools version: 69.2.0
six version: 1.16.0
tqdm version: 4.66.2
urllib3 version: 1.26.18
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Python requirements are satisfied.
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPath}undefined",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/",
"${config:idf.espIdfPathWin}/components/
",
"${config:idf.espAdfPath}/components/",
"${config:idf.espAdfPathWin}/components/
",
"${workspaceFolder}/"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/
",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
}
}
],
"version": 4
}


Extension

{"user":true,"message":"Something went wrong while getting the serial port list","stack":"TypeError: Cannot read properties of undefined (reading 'uri')\n\tat h (/dist/extension.js:2:1346779)\n\tat async kt.updatePortListStatus (/dist/extension.js:2:1427032)\n\tat async kt.displayList (/dist/extension.js:2:1426820)","level":"error","timestamp":"2024-03-21T00:51:25.385Z"}
~

Description

When selecting serial port it does not change.

Debug Message

{"user":true,"message":"Something went wrong while getting the serial port list","stack":"TypeError: Cannot read properties of undefined (reading 'uri')\n\tat h (/dist/extension.js:2:1346779)\n\tat async kt.updatePortListStatus (/dist/extension.js:2:1427032)\n\tat async kt.displayList (/dist/extension.js:2:1426820)","level":"error","timestamp":"2024-03-21T00:51:25.385Z"}

Other Steps to Reproduce

Waveshare ESP32C6 with combined jtag and serial loader ports.

In the end I just ran openocd manually to get the bootloader installed and then it seems the random usb to serial adapter worked.

 ./bin/openocd -f share/openocd/scripts/board/esp32c6-builtin.cfg

I have looked at several other instances of this issue and they say something about different user settings overrides but they don't actually say the clue how to fix it. I tried setting the local port, and deleting it but then somehow it got hard coded to /dev/ttyUSB0 and I could never get it back until I again hard coded it into the local project settings.

I am not even sure if the openocd start command line set up by the extension is functional.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@mianos mianos added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Mar 21, 2024
@github-actions github-actions bot changed the title can't change port on macos can't change port on macos (VSC-1330) Mar 21, 2024
@brianignacio5
Copy link
Collaborator

After you select the serial port, there should be a dropdown to choose the workspace folder to save the setting. Do you see this dropdown ?

@mianos
Copy link
Author

mianos commented Mar 21, 2024

wow, ok. I don't know why that was not obvious.

Then when I don't select that and click away it ignores my selection with this warning.

Thanks. At least this answers makes is much clearer than the other two.

That's quite a non intuitive pattern. I guess it's an MSVC UI framework limitation.

(Also guess it's like the whole IDF install instructions that don't mention everything is driven from the buttons along the bottom row. Or the fact that you actually have to select the IDF version in the initial install page).

Thanks again.

@mianos mianos closed this as completed Mar 21, 2024
@brianignacio5
Copy link
Collaborator

Will try to improve this so it chooses the already selected workspace folder.

If there something else not clear from documentation or UI, please let us know so we can improve.

@brianignacio5
Copy link
Collaborator

If you find the extension useful, please leave us a review in the Visual Studio Code Marketplace we haven't received any GitHub issue regarding setup problem as mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants