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

flashing not working with openocd runner #31944

Closed
evgeniy-paltsev opened this issue Feb 3, 2021 · 1 comment · Fixed by #31949
Closed

flashing not working with openocd runner #31944

evgeniy-paltsev opened this issue Feb 3, 2021 · 1 comment · Fixed by #31949
Assignees
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Milestone

Comments

@evgeniy-paltsev
Copy link
Collaborator

evgeniy-paltsev commented Feb 3, 2021

After 3204554 commit from #31881 I get the failure on flashing images to boards with openocd runner (during twister execution)

$ cat twister-out/emsdp/samples/hello_world/sample.basic.helloworld/device.log
--------------------
Traceback (most recent call last):
  File "/depot/Python/Python-3.7.0/bin/west", line 8, in 
    sys.exit(main())
  File "/u/svc-arcoss_auto/.local/lib/python3.7/site-packages/west/app/main.py", line 768, in main
    app.run(argv or sys.argv[1:])
  File "/u/svc-arcoss_auto/.local/lib/python3.7/site-packages/west/app/main.py", line 106, in run
    self.run_command(argv)
  File "/u/svc-arcoss_auto/.local/lib/python3.7/site-packages/west/app/main.py", line 334, in run_command
    self.run_extension(args.command, argv)
  File "/u/svc-arcoss_auto/.local/lib/python3.7/site-packages/west/app/main.py", line 397, in run_extension
    command.run(args, unknown, self.topdir, manifest=self.manifest)
  File "/u/svc-arcoss_auto/.local/lib/python3.7/site-packages/west/commands.py", line 116, in run
    self.do_run(args, unknown)
  File "/SCRATCH/arcjenkins2/slaves/ru20-custom-yunir-z400-lnx-EMSDP/workspace/arcoss_verification/zephyr_verification/sanity_check/zephyr/scripts/west_commands/flash.py", line 29, in do_run
    do_run_common(self, my_args, runner_args)
  File "/SCRATCH/arcjenkins2/slaves/ru20-custom-yunir-z400-lnx-EMSDP/workspace/arcoss_verification/zephyr_verification/sanity_check/zephyr/scripts/west_commands/run_common.py", line 221, in do_run_common
    runner = runner_cls.create(runner_config, args)
  File "/SCRATCH/arcjenkins2/slaves/ru20-custom-yunir-z400-lnx-EMSDP/workspace/arcoss_verification/zephyr_verification/sanity_check/zephyr/scripts/west_commands/runners/core.py", line 440, in create
    ret = cls.do_create(cfg, args)
  File "/SCRATCH/arcjenkins2/slaves/ru20-custom-yunir-z400-lnx-EMSDP/workspace/arcoss_verification/zephyr_verification/sanity_check/zephyr/scripts/west_commands/runners/openocd.py", line 112, in do_create
    gdb_port=args.gdb_port)
  File "/SCRATCH/arcjenkins2/slaves/ru20-custom-yunir-z400-lnx-EMSDP/workspace/arcoss_verification/zephyr_verification/sanity_check/zephyr/scripts/west_commands/runners/openocd.py", line 49, in __init__
    self.hex_name = Path(cfg.hex_file).as_posix()
  File "/depot/Python/Python-3.7.0/lib/python3.7/pathlib.py", line 983, in __new__
    self = cls._from_parts(args, init=False)
  File "/depot/Python/Python-3.7.0/lib/python3.7/pathlib.py", line 640, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "/depot/Python/Python-3.7.0/lib/python3.7/pathlib.py", line 624, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

This is how I launch 'twister':

./scripts/twister -v --test samples/hello_world/sample.basic.helloworld --platform emsdp --device-testing --device-serial /dev/serial-board-25163300316B --west-flash=--serial=25163300316B --report-dir /SCRATCH/jenkins-jobs/zephyr-sanity-check/../../logs
INFO    - Zephyr version: v2.5.0-rc2-21-gb49292634fc9
INFO    - JOBS: 4
INFO    - Building initial testcase list...
INFO    - 1 test suites (1 configurations) selected, 0 configurations discarded due to filters.

Device testing on:

| Platform   | ID   | Serial device                  |
|------------|------|--------------------------------|
| emsdp      |      | /dev/serial-board-25163300316B |

INFO    - Adding tasks to the queue...
INFO    - Added initial list of jobs to queue
INFO    - 1/1 emsdp                     samples/hello_world/sample.basic.helloworld        FAILED Timeout (device 62.318s)
ERROR   - see: /SCRATCH/arcjenkins2/slaves/ru20-custom-yunir-z400-lnx-EMSDP/workspace/arcoss_verification/zephyr_verification/sanity_check/twister-out/emsdp/samples/hello_world/sample.basic.helloworld/device.log

INFO    - 0 of 1 test configurations passed (0.00%), 1 failed, 0 skipped with 0 warnings in 89.44 seconds
INFO    - In total 1 test cases were executed, 0 skipped on 1 out of total 329 platforms (0.30%)
INFO    - 1 test configurations executed on platforms, 0 test configurations were only built.

NOTE: this isn't a duplicate of #31921 as #31935 doesn't fix this.

Tested with emsdp, iotdk, hsdk boards.

@evgeniy-paltsev evgeniy-paltsev added bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug labels Feb 3, 2021
@evgeniy-paltsev evgeniy-paltsev added the area: ARC ARC Architecture label Feb 3, 2021
@evgeniy-paltsev
Copy link
Collaborator Author

@abrodkin , @ruuddw , @IRISZZW - FYI.

@evgeniy-paltsev evgeniy-paltsev added this to the v2.5.0 milestone Feb 3, 2021
mbolivar-nordic added a commit to mbolivar-nordic/zephyr that referenced this issue Feb 3, 2021
There are use cases where --use-elf is given and the hex file does not
exist. Handle them.

Fixes: zephyrproject-rtos#31944
Signed-off-by: Martí Bolívar <[email protected]>
nashif pushed a commit that referenced this issue Feb 3, 2021
There are use cases where --use-elf is given and the hex file does not
exist. Handle them.

Fixes: #31944
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
area: ARC ARC Architecture 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