zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.48k stars 6.41k forks source link

jlinkarm.so files renamed in latest J-Link drivers #50016

Closed inductivekickback closed 2 years ago

inductivekickback commented 2 years ago

Running "west debug" on Linux fails when using an nRF53-DK, West version: v0.14.0, and JLink_V770e:

$ west debug -- west debug: rebuilding [0/4] Performing build step for 'ant_rpc_subimage' ninja: no work to do. -- west debug: using runner jlink Traceback (most recent call last): File "/home/foolsday/workspace/ncs/bin/west", line 8, in sys.exit(main()) File "/home/foolsday/workspace/ncs/lib/python3.10/site-packages/west/app/main.py", line 793, in main app.run(argv or sys.argv[1:]) File "/home/foolsday/workspace/ncs/lib/python3.10/site-packages/west/app/main.py", line 109, in run self.run_command(argv) File "/home/foolsday/workspace/ncs/lib/python3.10/site-packages/west/app/main.py", line 345, in run_command self.run_extension(args.command, argv) File "/home/foolsday/workspace/ncs/lib/python3.10/site-packages/west/app/main.py", line 417, in run_extension command.run(args, unknown, self.topdir, manifest=self.manifest, File "/home/foolsday/workspace/ncs/lib/python3.10/site-packages/west/commands.py", line 135, in run self.do_run(args, unknown) File "/home/foolsday/workspace/ncs/zephyr/scripts/west_commands/debug.py", line 34, in do_run do_run_common(self, my_args, runner_args) File "/home/foolsday/workspace/ncs/zephyr/scripts/west_commands/run_common.py", line 228, in do_run_common runner.run(command_name) File "/home/foolsday/workspace/ncs/zephyr/scripts/west_commands/runners/core.py", line 537, in run self.do_run(command, **kwargs) File "/home/foolsday/workspace/ncs/zephyr/scripts/west_commands/runners/jlink.py", line 203, in do_run self.logger.info(f'JLink version: {self.jlink_version_str}') File "/home/foolsday/workspace/ncs/zephyr/scripts/west_commands/runners/jlink.py", line 178, in jlink_version_str major, minor, rev = self.jlink_version File "/home/foolsday/workspace/ncs/zephyr/scripts/west_commands/runners/jlink.py", line 162, in jlink_version lib = Library(dllpath=os.fspath(Path(self.commander).parent / File "/home/foolsday/workspace/ncs/lib/python3.10/site-packages/pylink/library.py", line 278, in init self.load(dllpath) File "/home/foolsday/workspace/ncs/lib/python3.10/site-packages/pylink/library.py", line 384, in load with open(self._path, 'rb') as inputfile: FileNotFoundError: [Errno 2] No such file or directory: '/opt/SEGGER/JLink_V770e/jlinkarm.so'

It appears the jlinkarm.so files have been renamed to have a "lib" prefix. Creating a symlink fixes the issue: sudo ln -s /opt/SEGGER/JLink_V770e/libjlinkarm.so /opt/SEGGER/JLink_V770e/jlinkarm.so

marc-hb commented 2 years ago

As you can tell from zephyr/scripts/west_commands/runners/jlink.py, this is an issue in the zephyr repo, not a west issue. West is a wrapper / front-end that can invoke MANY tools that do many different things. It's very often "just the messenger".

nordicjm commented 2 years ago

This was fixed weeks ago in main and recently in 2.7 (needs v2.7-branch as the fix is not in the last released 2.7.3 version). Closing since this is fixed and the above is using nRF connect SDK instead of zephyr.