-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
West flash is not able to flash with openocd #29722
Comments
@Sergi22 Seems that west complains on a path issue. |
Hi @Sergi22,
Please run this command |
Problem solved, C:\Program Files\OpenOCD\bin was recognized as a PATH variable only after Windows reset. Currently, no problems with flashing. |
Getting the same problem. I put C:\Program Files\OpenOCD\bin in my path, and nothing happened, so I added C:\Program Files\OpenOCD\share and C:\Program Files\OpenOCD just in case, and still no luck. echo $path just replies with $path but echo %path% shows all three directories in my PATH variable. If I type openocd --version into cmd, I get the version information, so I know the path is correct. I also tried cmd as regular user and admin, and no difference. Any ideas? |
Hi @glenn-andrews , |
My apologies. I'll do so now |
(.venv) mdarif@mdarif:~/zephyrproject/zephyr/build$ west flash |
Describe the bug
west flash not able to find openocd. See logs.
After cmd west flash -H:
build configuration:
build directory: C:\Work\zephyrproject\zephyr\build
board: stm32f072b_disco
runners.yaml: C:\Work\zephyrproject\zephyr\build\zephyr\runners.yaml
available runners in runners.yaml:
openocd, jlink
default runner in runners.yaml:
openocd
common runner configuration:
To Reproduce
Steps to reproduce the behavior:
Logs and console output
C:\Work\zephyrproject\zephyr>west flash
-- west flash: rebuilding
[0/1] cmd.exe /C "cd /D C:\Work\zephyrproject\zephyr\build...\flash && "C:\Program Files\CMake\bin\cmake.exe" -E echo "
-- west flash: using runner openocd
Traceback (most recent call last):
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Roaming\Python\Python39\Scripts\west.exe_main.py", line 7, in
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\west\app\main.py", line 780, in main
app.run(argv or sys.argv[1:])
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\west\app\main.py", line 106, in run
self.run_command(argv)
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\west\app\main.py", line 339, in run_command
self.run_extension(args.command, argv)
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\west\app\main.py", line 409, in run_extension
command.run(args, unknown, self.topdir, manifest=self.manifest)
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\west\commands.py", line 129, in run
self.do_run(args, unknown)
File "C:\Work\zephyrproject\zephyr\scripts\west_commands\flash.py", line 29, in do_run
do_run_common(self, my_args, runner_args)
File "C:\Work\zephyrproject\zephyr\scripts/west_commands\run_common.py", line 210, in do_run_common
runner.run(command_name)
File "C:\Work\zephyrproject\zephyr\scripts/west_commands\runners\core.py", line 482, in run
self.do_run(command, **kwargs)
File "C:\Work\zephyrproject\zephyr\scripts/west_commands\runners\openocd.py", line 115, in do_run
self.require(self.openocd_cmd[0])
File "C:\Work\zephyrproject\zephyr\scripts/west_commands\runners\core.py", line 502, in require
if shutil.which(program) is None:
File "c:\python39\lib\shutil.py", line 1380, in which
if os.path.dirname(cmd):
File "c:\python39\lib\ntpath.py", line 223, in dirname
return split(p)[0]
File "c:\python39\lib\ntpath.py", line 185, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: