-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
espressif flash runner not working #71922
Comments
Hi @kalyanboddula! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
Did you follow the setup instructions as per https://docs.zephyrproject.org/latest/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies ? |
C:\Windows\system32>cd %HOMEPATH% C:\Users\KALYAN>python -m venv zephyrproject.venv C:\Users\KALYAN>zephyrproject.venv\Scripts\activate.bat (.venv) C:\Users\KALYAN>pip install west (.venv) C:\Users\KALYAN>west init zephyrproject C:\Users\KALYAN.west (.venv) C:\Users\KALYAN>cd zephyrproject (.venv) C:\Users\KALYAN\zephyrproject>west update (.venv) C:\Users\KALYAN\zephyrproject>west zephyr-export ZephyrUnittest (C:/Users/KALYAN/zephyrproject/zephyr/share/zephyrunittest-package/cmake) (.venv) C:\Users\KALYAN\zephyrproject>pip install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt followed setup instructions .All Requirements are satisfied but still facing an issue,you can see it above.. |
(.venv) C:\Users\KALYAN\zephyrproject\zephyr>west flash Leaving... (.venv) C:\Users\KALYAN\zephyrproject\zephyr>west espressif monitor During handling of the above exception, another exception occurred: Traceback (most recent call last): Thank you @nordicjm for your reply,Tried again after following the setup instructions but still facing the problem. |
The error doesn't really make sense because serial is pyserial. |
@kalyanboddula, can you try applying this change in your environment? The error might be Windows related: zephyrproject-rtos/hal_espressif#277 |
@sylvioalves i tried applying the changes you have suggested in my environment and changed by window path to string by doing changes in my west/tools.py These are the changes I have done
By changing these windowpath to string i am still getting this error,I am not understanding the issue of it showing the error like this: (.venv) C:\Users\KALYAN\zephyrproject\zephyr>west espressif monitor |
It looks like you've made some progress by taking the changes in the PR @kalyanboddula , but now have a slightly different issue. Is that correct? |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Re-tested and confirmed it is working. Open again if there is new issue. |
Describe the bug
(.venv) C:\Users\KALYAN\zephyrproject\zephyr>west espressif monitor
Serial port COM9
Connecting...
COM9 failed to connect: Write timeout
Serial port COM6
Connecting...............
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
Traceback (most recent call last):
File "C:\Users\KALYAN\zephyrproject\zephyr..\modules\hal\espressif\tools\idf_monitor.py", line 34, in
import serial
ModuleNotFoundError: No module named 'serial'
Traceback (most recent call last):
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\app\main.py", line 505, in run_command
self.run_extension(args.command, argv)
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\app\main.py", line 654, in run_extension
self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\commands.py", line 194, in run
self.do_run(args, unknown)
File "C:\Users\KALYAN\zephyrproject\modules\hal\espressif\west\tools.py", line 165, in do_run
self.monitor(module_path, args)
File "C:\Users\KALYAN\zephyrproject\modules\hal\espressif\west\tools.py", line 184, in monitor
cmd_exec(("python.exe", monitor_path, "-p", esp_port,
File "C:\Users\KALYAN\zephyrproject\modules\hal\espressif\west\tools.py", line 40, in cmd_exec
return subprocess.check_call(cmd, cwd=cwd, shell=shell)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('python.exe', WindowsPath('C:/Users/KALYAN/zephyrproject/zephyr/../modules/hal/espressif/tools/idf_monitor.py'), '-p', 'COM6', '-b', '115200', WindowsPath('C:/Users/KALYAN/zephyrproject/zephyr/build/zephyr/zephyr.elf'), '--eol', 'CRLF')' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\KALYAN\zephyrproject.venv\Scripts\west.exe_main.py", line 7, in
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\app\main.py", line 1085, in main
app.run(argv or sys.argv[1:])
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\app\main.py", line 244, in run
self.run_command(argv, early_args)
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\app\main.py", line 543, in run_command
f'{quote_sh_list(cpe.cmd)}', fatal=True)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\util.py", line 42, in quote_sh_list
return ' '.join(shlex.quote(s) for s in cmd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\KALYAN\zephyrproject.venv\Lib\site-packages\west\util.py", line 42, in
return ' '.join(shlex.quote(s) for s in cmd)
^^^^^^^^^^^^^^
File "C:\Python311\Lib\shlex.py", line 329, in quote
if _find_unsafe(s) is None:
^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'WindowsPath'
Environment
boards/espressif/esp32_devkitc_wroom/doc/index
I am facing this issue trying to serial monitor the hello_world code,facing no issue on flashing but monitor doesn't works,
can anyone suggest me resolve this issue.
The text was updated successfully, but these errors were encountered: