Ozone - finding sources for ELF which references static libraries

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Ozone - finding sources for ELF which references static libraries

    Dear all,

    I have a project which builds to an ELF file and which uses multiple static libraries. Within the project itself, and the libraries, the source tree is heavily nested. Because each library is built by itself (using recursive make), the file paths recorded in the final ELF are all relative. So, for example, a sources file will have its path recorded as "src/a/b/file.c". That path is relative to the root directory for one of the libraries, but the ELF file does not record which one. Each library is standalone and is used by multiple projects, so this structure has been working well for us for a number of years.

    If, in Ozone, I use Project.SetRootPath to set the root path to one of the libraries, Ozone will immediately find all of the source files in that library. However, it will only find the source files in that library. If I set the root path again, to a different library, if now will only find the source in the second library. If I use Project.AddSearchPath to add the root directory for the library to the Ozone search path then it will find none of the library source or header files. I believe this is because, for the root path, Ozone respects the relative path of each file and appends it to the specified root path; whereas, for the search path, Ozone ignores relative paths. I think this means that, for every subdirectory in every library we use (there are hundreds) we must add the directory to the search path. That means that if we make a small change to the structure of one the libraries we must update the search path directories in the Ozone project file. In fact, given how many directories there are, I need to write a script to create the Ozone project file in the first place.

    Is this really the case? Is there a better solution?

    Many thanks in advance,

    Peter
  • Example jdebug file for project with library dependencies

    Further to my question above, I created a .jdebug file which specifies all of the necessary search paths individually. I have attached an example below (I renamed the file to allow me to attach it). Ozone will not load this project now (it hangs). I'm guessing that there are too many search paths. Are there any suggestions for solving this issue?

    Thanks in advance,

    Peter
    Files
  • Hi,

    With V2.22m, which is available now, there is a new command Project.AddRootPath(), which you can use to set the root paths of your libraries.

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.