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

macOS ARM libraries missing and x64 throw an error on ARM #28

Open
Sn0wfreezeDev opened this issue Nov 25, 2021 · 2 comments
Open

macOS ARM libraries missing and x64 throw an error on ARM #28

Sn0wfreezeDev opened this issue Nov 25, 2021 · 2 comments

Comments

@Sn0wfreezeDev
Copy link

Hi,

I recently tested the tool on macOS with an M1 ARM chip.
It defaults back to x64, which throws an error:

with LowLevel.API(
File "/private/var/folders/dw/679j8kp90psgk8pxq06vmnzc0000gp/T/OpenHaystack/venv/lib/python3.8/site-packages/pynrfjprog/LowLevel.py", line 1798, in __enter__
self.open()
File "/private/var/folders/dw/679j8kp90psgk8pxq06vmnzc0000gp/T/OpenHaystack/venv/lib/python3.8/site-packages/pynrfjprog/LowLevel.py", line 177, in open
raise APIError(result, error_data=self.get_errors())
pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -254 INTERNAL_ERROR.

Since the error occurs in the NRFJPROG DLL I cannot really find out where it occurs. I guess that a recompile for ARM64 with the libraries could solve the issue.

@chrta
Copy link

chrta commented Dec 8, 2021

I see the same error with nrf-command-line-tools-10.15.1_linux-amd64.zip on Ubuntu 20.04.3 LTS on x86_64 from this sample code:

from pynrfjprog import LowLevel

with LowLevel.API('NRF91') as api:
    api.enum_emu_snr()
    api.connect_to_emu_without_snr()
    api.disconnect_from_emu()

I installed above version of command line tools and JLink via included deb packages and pynrfjprog via pip.

Addition: I managed so solve it (i am not sure why) on my PC. There seems to be some issue with pyenv https://github.com/pyenv/pyenv which i use. Instead of installing it via python3 -m pip install pynrfjprog, i installed it from the incuded sources via:

cd /opt/nrf-command-line-tools/python
python3 -m pip install .

I suspect the native libs are not installed to the correct path when something like pyenv is being used. I am not sure if this is the same issue on the M1 ARM chip.

@simtind
Copy link
Contributor

simtind commented Feb 3, 2022

Hi,
Unfortunately 10.15.1 shipped with binaries without execute-rights, which causes execution of the worker process to fail.
This should be fixed in 10.15.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants