Skip to content

flashing not working with openocd runner  #31944

@evgeniy-paltsev

Description

@evgeniy-paltsev

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.

Metadata

Metadata

Labels

area: ARCARC ArchitecturebugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bug

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions