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

FreeBSD/*BSD support missing #7

Closed
cederom opened this issue May 12, 2021 · 6 comments
Closed

FreeBSD/*BSD support missing #7

cederom opened this issue May 12, 2021 · 6 comments

Comments

@cederom
Copy link
Contributor

cederom commented May 12, 2021

Hello world :-)

This pypemicro is now part of the https://github.com/pyocd/pyOCD and became a blocker on FreeBSD platform, probably other *BSD platforms (i.e. OpenBSD, NetBSD, etc), and other platforms not on the list of: Windows, Linux, Darwin.

  • I will try to fix the OS detection mechanism.
(venv37zephyr) pyocd list
0001557:CRITICAL:__main__:Unable to determinate running operation system (FreeBSD)
Traceback (most recent call last):
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pypemicro/pemicro.py", line 401, in get_pemicro_lib
    libs_list = PyPemicro.get_pemicro_lib_list(dllpath=dllpath)
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pypemicro/pemicro.py", line 142, in get_pemicro_lib_list
    lib_name = PyPemicro.get_library_name()
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pypemicro/pemicro.py", line 99, in get_library_name
    raise PEMicroException(f"Unable to determinate running operation system ({system_name})")
pypemicro.pemicro.PEMicroException: Unable to determinate running operation system (FreeBSD)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pypemicro/pemicro.py", line 419, in list_ports
    lib = PyPemicro.get_pemicro_lib()
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pypemicro/pemicro.py", line 407, in get_pemicro_lib
    raise PEMicroException(str(exc))
pypemicro.pemicro.PEMicroException: Unable to determinate running operation system (FreeBSD)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pyocd_pemicro-1.0.4-py3.7.egg/pyocd_pemicro/pemicro_probe.py", line 81, in get_all_connected_probes
    port_list = pemicro.list_ports()
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pypemicro/pemicro.py", line 421, in list_ports
    raise PEMicroException(str(exc))
pypemicro.pemicro.PEMicroException: Unable to determinate running operation system (FreeBSD)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pyocd-0.30.4.dev31-py3.7.egg/pyocd/__main__.py", line 150, in run
    status = cmd.invoke()
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pyocd-0.30.4.dev31-py3.7.egg/pyocd/subcommands/list_cmd.py", line 93, in invoke
    ConnectHelper.list_connected_probes()
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pyocd-0.30.4.dev31-py3.7.egg/pyocd/core/helpers.py", line 109, in list_connected_probes
    allProbes = ConnectHelper.get_all_connected_probes(blocking=False)
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pyocd-0.30.4.dev31-py3.7.egg/pyocd/core/helpers.py", line 82, in get_all_connected_probes
    allProbes = DebugProbeAggregator.get_all_connected_probes(unique_id=unique_id)
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pyocd-0.30.4.dev31-py3.7.egg/pyocd/probe/aggregator.py", line 64, in get_all_connected_probes
    probes += cls.get_all_connected_probes(unique_id, is_explicit)
  File "/home/x/usr/local/venv37zephyr/lib/python3.7/site-packages/pyocd_pemicro-1.0.4-py3.7.egg/pyocd_pemicro/pemicro_probe.py", line 90, in get_all_connected_probes
    raise cls._convert_exception(exc) from exc
pyocd.core.exceptions.ProbeError: Unable to determinate running operation system (FreeBSD)
  • Another issue is the binary blob library provided with the package. Is it Open-Source? Can I compile it somehow?
@cederom
Copy link
Contributor Author

cederom commented May 13, 2021

Here you go #8 :-) Detection added to FreeBSD, OpenBSD and NetBSD :-)

Binary blobs of the library needs to be provided yet by the vendor - are they Open-Source so I can build and upload?

There are also other *BSD Unix systems out there. You may want to check them with if "BSD" in platform.system() even if no library is provided that will prevent faults on platforms where pypemicro is a hard dependency :-)

@cederom
Copy link
Contributor Author

cederom commented Jul 15, 2021

Is it possible to create a release @Gargy007 ? 0.1.6 does not work on FreeBSD and is a blocker for automated environment setup with pip :-(

@Gargy007
Copy link
Contributor

Gargy007 commented Jul 15, 2021 via email

@cederom
Copy link
Contributor Author

cederom commented Jul 15, 2021

Great news, thank you @Gargy007, enjoy your free time :-)

@Gargy007
Copy link
Contributor

Gargy007 commented Aug 2, 2021 via email

@cederom
Copy link
Contributor Author

cederom commented Aug 2, 2021

TANK U SIR! =)

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

2 participants