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: runners: jlink: JLink.exe name collision #51825

Open
JordanYates opened this issue Nov 1, 2022 · 11 comments
Open

west: runners: jlink: JLink.exe name collision #51825

JordanYates opened this issue Nov 1, 2022 · 11 comments
Assignees
Labels
area: Flashing area: Windows Support Related to building Zephyr on Windows bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@JordanYates
Copy link
Collaborator

Describe the bug

The jlink binary runner uses the location of JLink.exe or JLinkExe to determine the location of the JLink libraries,

DEFAULT_JLINK_EXE = 'JLink.exe' if sys.platform == 'win32' else 'JLinkExe'

commander=DEFAULT_JLINK_EXE,

lib = Library(dllpath=os.fspath(Path(self.commander).parent /
libname))

Unfortunately the OpenJDK runtime also distributes an executable called jlink.exe : https://strontic.github.io/xcyclopedia/library/jlink.exe-15C86A7D8376EC476DD2AE27EAEE31D1.html

Trying to run west flash with the runtime on the path results in errors like:

packages\pylink\library.py", line 286, in __init__
    self.load(dllpath)
  File "C:\Python310\lib\site-packages\pylink\library.py", line 392, in load
    with open(self._path, 'rb') as inputfile:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Eclipse Adoptium\\jdk-11.0.16.101-hotspot\\bin\\JLink_x64.dll'

Expected behavior

The jlink plugin should ideally be more resilient to finding a SEGGER executable, not any old executable called jlink.exe.

Impact

Annoyance, the correct path can be selected with west flash --commander /path/to/JLink.exe

Environment (please complete the following information):

  • OS: Windows
@JordanYates JordanYates added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug labels Nov 1, 2022
@laurenmurphyx64 laurenmurphyx64 added the area: Windows Support Related to building Zephyr on Windows label Nov 1, 2022
@github-actions
Copy link

github-actions bot commented Jan 1, 2023

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Jan 1, 2023
@JordanYates JordanYates removed the Stale label Jan 1, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions
Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Copy link

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Nov 17, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
@ehughes
Copy link

ehughes commented Jun 21, 2024

@JordanYates FYI. Thanks for this. I ran into this as well.

@Xentax5
Copy link

Xentax5 commented Aug 14, 2024

@JordanYates Also thanks. Same issue here.

@JordanYates JordanYates reopened this Aug 14, 2024
@github-actions github-actions bot removed the Stale label Aug 15, 2024
@dleach02
Copy link
Member

We need a different assignee. Does someone on this ticket want to take this on?

@henry-202308
Copy link

I have also encountered this problem, and a temporary solution is:
Add the required Jlink.exe path to the first line of the environment variable PATH.

Copy link

github-actions bot commented Nov 5, 2024

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Nov 5, 2024
@JordanYates JordanYates removed the Stale label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flashing area: Windows Support Related to building Zephyr on Windows bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

8 participants