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

espressif flash runner not working #71922

Closed
kalyanboddula opened this issue Apr 25, 2024 · 10 comments
Closed

espressif flash runner not working #71922

kalyanboddula opened this issue Apr 25, 2024 · 10 comments
Assignees
Labels
area: Flashing bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug Stale

Comments

@kalyanboddula
Copy link

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

  • Page: boards/espressif/esp32_devkitc_wroom/doc/index
  • Version: main
  • SHA-1: c086603

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.

Copy link

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. 🤖💙

@nordicjm
Copy link
Collaborator

@nordicjm nordicjm closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@kalyanboddula
Copy link
Author

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
Requirement already satisfied: west in c:\users\kalyan\zephyrproject.venv\lib\site-packages (1.2.0)
Requirement already satisfied: colorama in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from west) (0.4.6)
Requirement already satisfied: PyYAML>=5.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from west) (6.0.1)
Requirement already satisfied: pykwalify in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from west) (1.8.0)
Requirement already satisfied: setuptools in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from west) (65.5.0)
Requirement already satisfied: packaging in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from west) (24.0)
Requirement already satisfied: docopt>=0.6.2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pykwalify->west) (0.6.2)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pykwalify->west) (2.9.0.post0)
Requirement already satisfied: ruamel.yaml>=0.16.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pykwalify->west) (0.18.6)
Requirement already satisfied: six>=1.5 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from python-dateutil>=2.8.0->pykwalify->west) (1.16.0)
Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from ruamel.yaml>=0.16.0->pykwalify->west) (0.2.8)

(.venv) C:\Users\KALYAN>west init zephyrproject
FATAL ERROR: already initialized in C:\Users\KALYAN, aborting.
Hint: if you do not want a workspace there,
remove this directory and re-run this command:

C:\Users\KALYAN.west

(.venv) C:\Users\KALYAN>cd zephyrproject

(.venv) C:\Users\KALYAN\zephyrproject>west update
=== updating acpica (modules/lib/acpica):
HEAD is now at da5f2721e Merge pull request #905 from najumon1980/acpi_timer
=== updating cmsis (modules/hal/cmsis):
HEAD is now at 4b96cbb doc: Update documentations for CMSIS 5.9.0
=== updating cmsis-dsp (modules/lib/cmsis-dsp):
HEAD is now at 6489e771 do not generate warnings when scalar functions are used with MVE
=== updating cmsis-nn (modules/lib/cmsis-nn):
HEAD is now at 0c8669d Merge pull request #1 from XenuIsWatching/zephyr
=== updating edtt (tools/edtt):
HEAD is now at 64e5105 edttt_bsim: Avoid infinite exception loop
=== updating fatfs (modules/fs/fatfs):
HEAD is now at 427159b zephyr: fix ffconf.h override use of STRINGIZE
=== updating hal_altera (modules/hal/altera):
HEAD is now at 0d225dd zephyr: update include paths to use <zephyr/...>
=== updating hal_ambiq (modules/hal/ambiq):
HEAD is now at ff4ca35 Stimer: remove disabling stmer's COMPARE interrupts in delta_set() api
=== updating hal_atmel (modules/hal/atmel):
HEAD is now at d6221e7 asf: CMakeLists.txt: Use new family prefix
=== updating hal_espressif (modules/hal/espressif):
HEAD is now at e705cc16c4 uart: add call to retrieve port_num by its register address
=== updating hal_ethos_u (modules/hal/ethos_u):
HEAD is now at 90ada2e Clarify README regarding CPU choice
=== updating hal_gigadevice (modules/hal/gigadevice):
HEAD is now at 2994b7d README.md: add pllmf and pack exception for gd32a50x
=== updating hal_infineon (modules/hal/infineon):
HEAD is now at b1a4723 hal: infineon: Update for hwmv2
=== updating hal_intel (modules/hal/intel):
HEAD is now at 7b4c256 iut: add -Werror to make all warnings into errors
=== updating hal_microchip (modules/hal/microchip):
HEAD is now at 68575aa CMakeLists: use MEC15XX for the series option
=== updating hal_nordic (modules/hal/nordic):
HEAD is now at 13ac55b nrfx: Update to version 3.4.0
=== updating hal_nuvoton (modules/hal/nuvoton):
HEAD is now at cf24f9e hal: nuvoton: support external dts or *.h of hal-M2L31X
=== updating hal_nxp (modules/hal/nxp):
HEAD is now at 3c4f74b devices: MCXN947: Update system file to remove SDK sepecific defines
=== updating hal_openisa (modules/hal/openisa):
HEAD is now at eabd530 fix-double-promotion in fsl_xcvr_trim
=== updating hal_quicklogic (modules/hal/quicklogic):
HEAD is now at b3a66fe Remove references to FPGA IP core drivers
=== updating hal_renesas (modules/hal/renesas):
HEAD is now at 991e060 hal: renesas: Update for hwmv2
=== updating hal_rpi_pico (modules/hal/rpi_pico):
HEAD is now at fba7162 Merge pull request #5 from soburi/zephyr_timer_modification
=== updating hal_silabs (modules/hal/silabs):
HEAD is now at 442d0fb gecko/cmake: replace 'SOC_GECKO_SERIESx' with 'SOC_FAMILY_SILABS_Sx'
=== updating hal_st (modules/hal/st):
HEAD is now at 0643d20 zephyr/module.yml: enable use of kconfig-ext
=== updating hal_stm32 (modules/hal/stm32):
HEAD is now at 60c9634f dts: New batch of pinctrl.dtsi files including SWJ signals
=== updating hal_telink (modules/hal/telink):
HEAD is now at 38573af B91 ADC driver support
=== updating hal_ti (modules/hal/ti):
HEAD is now at b85f86e simplelink: slnetsock: fix sys/time.h include when sockets are enabled
=== updating hal_wurthelektronik (modules/hal/wurthelektronik):
HEAD is now at e5bcb2e Update WE sensors SDK to version 2.5.0
=== updating hal_xtensa (modules/hal/xtensa):
HEAD is now at a2d6585 zephyr: rename SoC overlay for NXP i.MX8ULP
=== updating hostap (modules/lib/hostap):
HEAD is now at 9ad92f524 [toup] zephyr: Waiting semaphore was reset too late
=== updating libmetal (modules/hal/libmetal):
HEAD is now at 243eed5 lib: update libmetal to SHA f55c02a7b582
=== updating liblc3 (modules/lib/liblc3):
HEAD is now at 1a5938e meson: Bump to version 1.0.4
=== updating littlefs (modules/fs/littlefs):
HEAD is now at 408c16a Merge pull request #14 from de-nordic/update-to-v2.8.1
=== updating loramac-node (modules/lib/loramac-node):
HEAD is now at 1bf2120c mac: region: RegionCommon: fix implicit double promotion
=== updating lvgl (modules/lib/gui/lvgl):
HEAD is now at 2b76c641 release v8.3.11
=== updating mbedtls (modules/crypto/mbedtls):
HEAD is now at 6ec4abdcd Merge pull request #52 from ceolin/mbedtls-352
=== updating mcuboot (bootloader/mcuboot):
HEAD is now at 9fb7ce5d boot: zephyr: Fix estimated size calculation
=== updating mipi-sys-t (modules/debug/mipi-sys-t):
HEAD is now at a819419 library: allow building without wchar support
=== updating net-tools (tools/net-tools):
HEAD is now at 3a677d3 docker: Use fixed milestone release for Leshan
=== updating nrf_hw_models (modules/bsim_hw_models/nrf_hw_models):
HEAD is now at df94612 GPIO: Add test API to be notified on output changes
=== updating open-amp (modules/lib/open-amp):
HEAD is now at da78aea lib: update open-amp lib to release v2023.10.0
=== updating openthread (modules/lib/openthread):
HEAD is now at 49c59ec51 [mbedtls] make debug logging independent from builtin (#9848)
=== updating percepio (modules/debug/percepio):
HEAD is now at 7f6fb3f Merge branch 'main' into zephyr
=== updating picolibc (modules/lib/picolibc):
HEAD is now at 764ef4e40 Version 1.8.6
=== updating segger (modules/debug/segger):
HEAD is now at 9d01912 segger: config: RTT spinlock implementation
=== updating tinycrypt (modules/crypto/tinycrypt):
HEAD is now at 1012a3e Fix warnings reported by UBSAN
=== updating trusted-firmware-m (modules/tee/tf-m/trusted-firmware-m):
HEAD is now at 0b898c9b7 Platform: nxp: Add initialization flag to the CMSIS USART driver.
=== updating trusted-firmware-a (modules/tee/tf-a/trusted-firmware-a):
HEAD is now at 421dc0502 Merge pull request #3 from SgrrZhf/topics/huizha01/2.9.0-updates
=== updating uoscore-uedhoc (modules/lib/uoscore-uedhoc):
HEAD is now at 150f4eb [zephyr fromlist] Adapt to changes in name generation in zcbor 0.8.0
=== updating zcbor (modules/lib/zcbor):
HEAD is now at 75d0880 tests: Update mps2 board name

(.venv) C:\Users\KALYAN\zephyrproject>west zephyr-export
Zephyr (C:/Users/KALYAN/zephyrproject/zephyr/share/zephyr-package/cmake)
has been added to the user package registry in:
HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr

ZephyrUnittest (C:/Users/KALYAN/zephyrproject/zephyr/share/zephyrunittest-package/cmake)
has been added to the user package registry in:
HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\ZephyrUnittest

(.venv) C:\Users\KALYAN\zephyrproject>pip install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt
Requirement already satisfied: pyelftools>=0.27 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 7)) (0.31)
Requirement already satisfied: PyYAML>=5.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 11)) (6.0.1)
Requirement already satisfied: pykwalify in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 14)) (1.8.0)
Requirement already satisfied: canopen in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 17)) (2.2.0)
Requirement already satisfied: packaging in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 18)) (24.0)
Requirement already satisfied: progress in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 19)) (1.6)
Requirement already satisfied: psutil in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 20)) (5.9.8)
Requirement already satisfied: pylink-square in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 21)) (1.2.0)
Requirement already satisfied: pyserial in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 22)) (3.5)
Requirement already satisfied: requests in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 23)) (2.31.0)
Requirement already satisfied: anytree in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 26)) (2.12.1)
Requirement already satisfied: intelhex in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 29)) (2.3.0)
Requirement already satisfied: west>=0.14.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 33)) (1.2.0)
Requirement already satisfied: windows-curses in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 37)) (2.3.2)
Requirement already satisfied: colorama in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 7)) (0.4.6)
Requirement already satisfied: ply>=3.10 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 10)) (3.11)
Requirement already satisfied: gcovr>=6.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 13)) (7.2)
Requirement already satisfied: coverage in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 14)) (7.4.4)
Requirement already satisfied: pytest in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 17)) (8.1.1)
Requirement already satisfied: mypy in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 18)) (1.9.0)
Requirement already satisfied: mock>=4.0.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 21)) (5.1.0)
Requirement already satisfied: pyocd>=0.35.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (0.36.0)
Requirement already satisfied: tabulate in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 9)) (0.9.0)
Requirement already satisfied: natsort in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 10)) (8.4.0)
Requirement already satisfied: cbor>=1.0.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 13)) (1.0.0)
Requirement already satisfied: bz in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 19)) (1.0)
Requirement already satisfied: gitlint in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 7)) (0.19.1)
Requirement already satisfied: junit2html in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 10)) (30.1.6)
Requirement already satisfied: clang-format>=15.0.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 13)) (18.1.1)
Requirement already satisfied: lpc_checksum in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 16)) (3.0.0)
Requirement already satisfied: Pillow>=10.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 19)) (10.2.0)
Requirement already satisfied: imgtool>=2.0.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 22)) (2.0.0)
Requirement already satisfied: grpcio-tools>=1.47.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 25)) (1.62.1)
Requirement already satisfied: protobuf>=3.20.3 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 26)) (4.25.3)
Requirement already satisfied: PyGithub in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 29)) (2.2.0)
Requirement already satisfied: graphviz in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 32)) (0.20.2)
Requirement already satisfied: zcbor>=0.8.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 35)) (0.8.1)
Requirement already satisfied: python-magic in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 4)) (0.4.27)
Requirement already satisfied: python-magic-bin in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 5)) (0.4.14)
Requirement already satisfied: lxml in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 6)) (5.1.0)
Requirement already satisfied: junitparser>=2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 7)) (3.1.2)
Requirement already satisfied: pylint in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 8)) (3.1.0)
Requirement already satisfied: yamllint in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from -r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 9)) (1.35.1)
Requirement already satisfied: docopt>=0.6.2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pykwalify->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 14)) (0.6.2)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pykwalify->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 14)) (2.9.0.post0)
Requirement already satisfied: ruamel.yaml>=0.16.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pykwalify->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 14)) (0.18.6)
Requirement already satisfied: python-can>=3.0.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from canopen->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 17)) (4.3.1)
Requirement already satisfied: six in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pylink-square->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 21)) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from requests->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 23)) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from requests->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 23)) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from requests->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 23)) (2.2.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from requests->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 23)) (2024.2.2)
Requirement already satisfied: setuptools in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from west>=0.14.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 33)) (65.5.0)
Requirement already satisfied: jinja2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from gcovr>=6.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 13)) (3.1.3)
Requirement already satisfied: colorlog in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from gcovr>=6.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 13)) (6.8.2)
Requirement already satisfied: pygments>=2.13.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from gcovr>=6.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 13)) (2.17.2)
Requirement already satisfied: iniconfig in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pytest->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 17)) (2.0.0)
Requirement already satisfied: pluggy<2.0,>=1.4 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pytest->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 17)) (1.4.0)
Requirement already satisfied: typing-extensions>=4.1.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from mypy->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 18)) (4.10.0)
Requirement already satisfied: mypy-extensions>=1.0.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from mypy->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 18)) (1.0.0)
Requirement already satisfied: capstone<5.0,>=4.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (4.0.2)
Requirement already satisfied: cmsis-pack-manager<1.0,>=0.5.2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (0.5.3)
Requirement already satisfied: importlib-metadata>=3.6 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (7.0.2)
Requirement already satisfied: importlib-resources in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (6.3.2)
Requirement already satisfied: intervaltree<4.0,>=3.0.2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (3.1.0)
Requirement already satisfied: lark<2.0,>=1.1.5 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (1.1.9)
Requirement already satisfied: libusb-package<2.0,>=1.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (1.0.26.2)
Requirement already satisfied: prettytable<4.0,>=2.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (3.10.0)
Requirement already satisfied: pyusb<2.0,>=1.2.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (1.2.1)
Requirement already satisfied: hidapi<1.0,>=0.10.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (0.14.0)
Requirement already satisfied: gitlint-core==0.19.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from gitlint-core[trusted-deps]==0.19.1->gitlint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 7)) (0.19.1)
Requirement already satisfied: arrow>=1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from gitlint-core==0.19.1->gitlint-core[trusted-deps]==0.19.1->gitlint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 7)) (1.2.3)
Requirement already satisfied: click>=8 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from gitlint-core==0.19.1->gitlint-core[trusted-deps]==0.19.1->gitlint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 7)) (8.1.3)
Requirement already satisfied: cbor2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from imgtool>=2.0.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 22)) (5.6.2)
Requirement already satisfied: cryptography>=2.4.2 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from imgtool>=2.0.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 22)) (42.0.5)
Requirement already satisfied: grpcio>=1.62.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from grpcio-tools>=1.47.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 25)) (1.62.1)
Requirement already satisfied: pynacl>=1.4.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from PyGithub->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 29)) (1.5.0)
Requirement already satisfied: pyjwt>=2.4.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pyjwt[crypto]>=2.4.0->PyGithub->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 29)) (2.8.0)
Requirement already satisfied: Deprecated in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from PyGithub->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 29)) (1.2.14)
Requirement already satisfied: regex>=2022.3.15 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from zcbor>=0.8.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-extras.txt (line 35)) (2023.12.25)
Requirement already satisfied: platformdirs>=2.2.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pylint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 8)) (4.2.0)
Requirement already satisfied: astroid<=3.2.0-dev0,>=3.1.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pylint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 8)) (3.1.0)
Requirement already satisfied: isort!=5.13.0,<6,>=4.2.5 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pylint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 8)) (5.13.2)
Requirement already satisfied: mccabe<0.8,>=0.6 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pylint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 8)) (0.7.0)
Requirement already satisfied: tomlkit>=0.10.1 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pylint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 8)) (0.12.4)
Requirement already satisfied: dill>=0.3.6 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from pylint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 8)) (0.3.8)
Requirement already satisfied: pathspec>=0.5.3 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from yamllint->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-compliance.txt (line 9)) (0.12.1)
Requirement already satisfied: appdirs<2.0,>=1.4 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from cmsis-pack-manager<1.0,>=0.5.2->pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (1.4.4)
Requirement already satisfied: cffi in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from cmsis-pack-manager<1.0,>=0.5.2->pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (1.16.0)
Requirement already satisfied: zipp>=0.5 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from importlib-metadata>=3.6->pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (3.18.1)
Requirement already satisfied: sortedcontainers<3.0,>=2.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from intervaltree<4.0,>=3.0.2->pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (2.4.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from jinja2->gcovr>=6.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-build-test.txt (line 13)) (2.1.5)
Requirement already satisfied: wcwidth in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from prettytable<4.0,>=2.0->pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (0.2.13)
Requirement already satisfied: wrapt~=1.10 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from python-can>=3.0.0->canopen->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 17)) (1.16.0)
Requirement already satisfied: pywin32>=305 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from python-can>=3.0.0->canopen->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 17)) (306)
Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from ruamel.yaml>=0.16.0->pykwalify->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-base.txt (line 14)) (0.2.8)
Requirement already satisfied: pycparser in c:\users\kalyan\zephyrproject.venv\lib\site-packages (from cffi->cmsis-pack-manager<1.0,>=0.5.2->pyocd>=0.35.0->-r \Users\KALYAN\zephyrproject\zephyr\scripts\requirements-run-test.txt (line 6)) (2.21)

followed setup instructions .All Requirements are satisfied but still facing an issue,you can see it above..

@kalyanboddula
Copy link
Author

(.venv) C:\Users\KALYAN\zephyrproject\zephyr>west flash
-- west flash: rebuilding
[1/1] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\KALYA...Users/KALYAN/zephyrproject/zephyr/build/zephyr/zephyr.elf"
-- west flash: using runner esp32
-- runners.esp32: reset after flashing requested
-- runners.esp32: Flashing esp32 chip on None (921600bps)
esptool.py v4.5
Found 5 serial ports
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
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 58:bf:25:33:07:58
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 0x00001000 to 0x00007fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00033fff...
Flash params set to 0x0220
Wrote 32768 bytes at 0x00001000 in 0.7 seconds (383.4 kbit/s)...
Hash of data verified.
Wrote 16384 bytes at 0x00008000 in 0.3 seconds (489.4 kbit/s)...
Hash of data verified.
Wrote 147456 bytes at 0x00010000 in 2.1 seconds (571.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

(.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'

Thank you @nordicjm for your reply,Tried again after following the setup instructions but still facing the problem.

@nordicjm
Copy link
Collaborator

The error doesn't really make sense because serial is pyserial.

@nordicjm nordicjm reopened this Apr 25, 2024
@nordicjm nordicjm changed the title doc: Documentation issue in 'boards/espressif/esp32_devkitc_wroom/doc/index' espressif flash runner not working Apr 25, 2024
@sylvioalves
Copy link
Collaborator

@kalyanboddula, can you try applying this change in your environment? The error might be Windows related: zephyrproject-rtos/hal_espressif#277

@kalyanboddula
Copy link
Author

@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

def cmd_exec(cmd, cwd=None, shell=True):
    return subprocess.check_call(str(cmd), cwd=str(cwd), shell=shell)

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
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
'-p' was unexpected at this time.
FATAL ERROR: command exited with status 1: '(' ''"'"'' p y t h o n . e x e ''"'"'' , ' ' W i n d o w s P a t h '(' ''"'"'' C : / U s e r s / K A L Y A N / z e p h y r p r o j e c t / z e p h y r / . . / m o d u l e s / h a l / e s p r e s s i f / t o o l s / i d f _ m o n i t o r . p y ''"'"'' ')' , ' ' ''"'"'' - p ''"'"'' , ' ' ''"'"'' C O M 6 ''"'"'' , ' ' ''"'"'' - b ''"'"'' , ' ' ''"'"'' 1 1 5 2 0 0 ''"'"'' , ' ' W i n d o w s P a t h '(' ''"'"'' C : / U s e r s / K A L Y A N / z e p h y r p r o j e c t / z e p h y r / b u i l d / z e p h y r / z e p h y r . e l f ''"'"'' ')' , ' ' ''"'"'' - - e o l ''"'"'' , ' ' ''"'"'' C R L F ''"'"'' ')'

@ajf58
Copy link
Contributor

ajf58 commented Apr 29, 2024

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?

@aescolar aescolar added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug labels Apr 30, 2024
Copy link

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.

@github-actions github-actions bot added the Stale label Jun 30, 2024
@sylvioalves
Copy link
Collaborator

Re-tested and confirmed it is working. Open again if there is new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flashing bug The issue is a bug, or the PR is fixing a bug platform: ESP32 Espressif ESP32 priority: low Low impact/importance bug Stale
Projects
None yet
Development

No branches or pull requests

5 participants