Navigation Menu

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

segger-ozone: init at 3.22a #108868

Merged
merged 1 commit into from Feb 14, 2021
Merged

Conversation

bmilanov
Copy link
Contributor

@bmilanov bmilanov commented Jan 9, 2021

From the project's homepage 1:

Ozone — The J-Link Debugger and Performance Analyzer

Ozone is a cross-platform debugger and performance analyzer for J-Link
and J-Trace.

  • Stand-alone graphical debugger
  • Debug output of any tool chain and IDE 1
  • C/C++ source level debugging and assembly instruction debugging
  • Debug information windows for any purpose: disassembly, memory,
    globals and locals, (live) watches, CPU and peripheral registers
  • Source editor to fix bugs immediately
  • High-speed programming of the application into the target
  • Direct use of J-Link built-in features (Unlimited Flash
    Breakpoints, Flash Download, Real Time Terminal, Instruction Trace)
  • Scriptable project files to set up everything automatically
    • New project wizard to ease the basic configuration of new projects

1 Ozone has been tested with the output of the following compilers:
GCC, Clang, ARM, IAR. Output of other compilers may be supported but is
not guaranteed to be.

Motivation for this change
TODO

I am not sure how deal with the following:

  1. Ozone is published with it's own non-standard filesystem organization: no "/bin", "/lib", etc. Directories and files only related to this package will stand out in the top-level of a nix profile directory. Would this be fine? Should the package be reorganized with the main Ozone binary in "/bin", the libs in "/lib", etc. I am submitting this derivation with only "/Lib" renamed to "/lib", and Ozone symlinked to "/bin/Ozone". The published RPM and DEB packages place the contents of the package in "/opt".
  2. The fix-up phase finds ELFs inside "/lib" that are not related to the execution of Ozone, and tries to run patch-elf on them. Is it possible to declare a white/blacklist of directories which fix-up should process/ignore?
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@bmilanov
Copy link
Contributor Author

Build has failed with:

anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-1/pkgs/development/tools/misc/segger-ozone/default.nix:1:1 called without required argument 'libudev', at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-1/lib/customisation.nix:69:16

how can we make it pass?

@SuperSandro2000
Copy link
Member

how can we make it pass?

libudev is an alias which ofborg ignores. I think udev should be the right package.

@bmilanov bmilanov marked this pull request as draft February 1, 2021 21:17
@bmilanov
Copy link
Contributor Author

bmilanov commented Feb 4, 2021

@SuperSandro2000 thank you for the fixes! I have reverted to a draft to add some udev rules for the package.

@bmilanov bmilanov marked this pull request as ready for review February 4, 2021 18:34
@bmilanov
Copy link
Contributor Author

bmilanov commented Feb 4, 2021

Will not add Segger's udev rules as they are distributed with another package with a separate license.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108868 run on x86_64-linux 1

1 package built:
  • segger-ozone

From the project's homepage [1]:

Ozone — The J-Link Debugger and Performance Analyzer

Ozone is a cross-platform debugger and performance analyzer for J-Link
and J-Trace.

  - Stand-alone graphical debugger
  - Debug output of any tool chain and IDE 1
  - C/C++ source level debugging and assembly instruction debugging
  - Debug information windows for any purpose: disassembly, memory,
    globals and locals, (live) watches, CPU and peripheral registers
  - Source editor to fix bugs immediately
  - High-speed programming of the application into the target
  - Direct use of J-Link built-in features (Unlimited Flash
    Breakpoints, Flash Download, Real Time Terminal, Instruction Trace)
  - Scriptable project files to set up everything automatically
    - New project wizard to ease the basic configuration of new projects

1 Ozone has been tested with the output of the following compilers:
GCC, Clang, ARM, IAR. Output of other compilers may be supported but is
not guaranteed to be.

[1]: https://www.segger.com/products/development-tools/ozone-j-link-debugger
@asfishman
Copy link

Getting the following error:

$ ./result/Ozone
./result/Ozone: error while loading shared libraries: libjlinkarm.so.6: cannot open shared object file: No such file or directory

@bmilanov
Copy link
Contributor Author

bmilanov commented Feb 13, 2021

Getting the following error:

$ ./result/Ozone
./result/Ozone: error while loading shared libraries: libjlinkarm.so.6: cannot open shared object file: No such file or directory

Hi!

ibjlinkarm.so.6 is included in the Ozone archive.

Can you post the output of:

ldd ./result/Ozone

and

ldd /nix/store/zln9dzig6k3b7zjni6y3h2i2rmk0skj0-segger-ozone-3.22a/lib/libjlinkarm.so.6.88.2

Could I have missed a transitive dependency?

@SuperSandro2000
Copy link
Member

That is linked correct for me.

@SuperSandro2000 SuperSandro2000 merged commit 2b37fe7 into NixOS:master Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants