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

west flash not working with pyocd #31921

Closed
pabigot opened this issue Feb 3, 2021 · 1 comment · Fixed by #31935
Closed

west flash not working with pyocd #31921

pabigot opened this issue Feb 3, 2021 · 1 comment · Fixed by #31935
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug

Comments

@pabigot
Copy link
Collaborator

pabigot commented Feb 3, 2021

As of commit 3204554 from #31881 I get the following failure:

tirzah[16]$ west update && rm -rf build && west build -b frdm_k64f
tirzah[17]$ west flash
-- west flash: rebuilding
[0/1] cd /mnt/nordic/zp/zephyr/samples/hello_world/build/zephyr/cmake/flash && /usr/bin/cmake -E echo

-- west flash: using runner pyocd
Traceback (most recent call last):
  File "/home/pab/.local/bin/west", line 8, in <module>
    sys.exit(main())
  File "/home/pab/.local/lib/python3.8/site-packages/west/app/main.py", line 779, in main
    app.run(argv or sys.argv[1:])
  File "/home/pab/.local/lib/python3.8/site-packages/west/app/main.py", line 106, in run
    self.run_command(argv)
  File "/home/pab/.local/lib/python3.8/site-packages/west/app/main.py", line 338, in run_command
    self.run_extension(args.command, argv)
  File "/home/pab/.local/lib/python3.8/site-packages/west/app/main.py", line 408, in run_extension
    command.run(args, unknown, self.topdir, manifest=self.manifest)
  File "/home/pab/.local/lib/python3.8/site-packages/west/commands.py", line 129, in run
    self.do_run(args, unknown)
  File "/mnt/nordic/zp/zephyr/scripts/west_commands/flash.py", line 29, in do_run
    do_run_common(self, my_args, runner_args)
  File "/mnt/nordic/zp/zephyr/scripts/west_commands/run_common.py", line 222, in do_run_common
    runner.run(command_name)
  File "/mnt/nordic/zp/zephyr/scripts/west_commands/runners/core.py", line 482, in run
    self.do_run(command, **kwargs)
  File "/mnt/nordic/zp/zephyr/scripts/west_commands/runners/pyocd.py", line 126, in do_run
    self.flash(**kwargs)
  File "/mnt/nordic/zp/zephyr/scripts/west_commands/runners/pyocd.py", line 131, in flash
    if os.path.isfile(self.hex_name):
  File "/usr/lib/python3.8/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
tirzah[18]$ 
@pabigot pabigot added the bug The issue is a bug, or the PR is fixing a bug label Feb 3, 2021
pabigot added a commit to pabigot/zephyr that referenced this issue Feb 3, 2021
@pabigot pabigot added the priority: high High impact/importance bug label Feb 3, 2021
mbolivar-nordic added a commit to mbolivar-nordic/zephyr that referenced this issue Feb 3, 2021
Commit 3204554 (" scripts: runners: error on missing
non-elf outputs") created the possibility of None bin_file and
hex_file attributes in the RunnerConfig without updating pyocd
appropriately. Fix that.

Fixes: zephyrproject-rtos#31921
Signed-off-by: Martí Bolívar <[email protected]>
@mbolivar-nordic
Copy link
Contributor

Sorry about that; I didn't follow the logic in this file correctly. I posted a fix now. #31935

nashif pushed a commit that referenced this issue Feb 3, 2021
Commit 3204554 (" scripts: runners: error on missing
non-elf outputs") created the possibility of None bin_file and
hex_file attributes in the RunnerConfig without updating pyocd
appropriately. Fix that.

Fixes: #31921
Signed-off-by: Martí Bolívar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants