Monday, December 11th 2017, 5:57pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

apullin

Beginner

Date of registration: Mar 31st 2010

Posts: 13

1

Thursday, October 27th 2016, 5:30am

Ozone, how to load a large source tree?

I am just trying out Ozone after seeing it at Arm TechCon today. I have a large makefile based project that I would like to bring some debug capability to. I have done some very limited debugging via a roundabout method using TrueStudio, which I believe just automates the interface over gdb-server and wraps a gui around it. But I would like to get set up with full streaming trace.

The ELF file output loads with no problem in Ozone, but there are hundreds of source and header files which are not found and will need to be located. Locating each one manually is not a tenable solution. Is there a way to automate thing, find or import automatically based on a root path?

Also, it seems like even if I manually add the source file and save the project, that file path is not stored anywhere in the project.

Any solutions? Both of these problems are total dealbreakers for using Ozone :S

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

2

Thursday, October 27th 2016, 9:59am

Hi,

thanks for trying out Ozone!
Unfortunately, my colleague responsible for questions regarding Ozone is out of Office today, therefore I will take over for today.

Quoted

The ELF file output loads with no problem in Ozone, but there are hundreds of source and header files which are not found and will need to be located. Locating each one manually is not a tenable solution. Is there a way to automate thing, find or import automatically based on a root path?

There are 3 possible reasons for this:
1) The missing source and header files are not used in the configuration used to build the ELF file. Therefore, they are not linked in the resulting application and also are not referred to in the ELF file.
2) The debug information were partly stripped out from the ELF-file due to a compiler option or as a part of a post-build procedure.
3) This is bug in the ELF-parser of Ozone.

Would it be possible to provide a project which can be used to reproduce the issue on our side?
You can contact me via PM or the SEGGER support team via Mail if have a project you can send us but do not wish to publish in the forum.


Best regards,
Niklas
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 364

3

Friday, October 28th 2016, 11:05am

Hi,

It looks like your elf-file includes insufficient source information or relative source file paths which are not relative to the output file.

For these cases you can use File Path Resolution functions in Ozone, via the Console Window or in your project file.
With these functions you can set the root for relative files, add additional search directories and substitute parts of absolute paths.

For more information have a look at Chapter 6.3 "File Path Resolution" of the Ozone User Manual.

Best regards
Johannes

apullin

Beginner

Date of registration: Mar 31st 2010

Posts: 13

4

Saturday, October 29th 2016, 1:08am

Interesting ... if I do Project.SetRootPath("..."), where "...." is the absolute path to the root directory where the makefile build is invoked, then all the source files auto-populate.


By adding that line into the OnProjectLoad function manually, then all the right settings seem to persist when I quit out and reload the project.

Are there any relative paths or root path information present in the ELF file? All I can see from objdump and readelf are the file names, but without any paths. Even when examining the elf file that *did* load without issue, I still only see plain filenames, but maybe there is some field that I am not seeing.

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 364

5

Monday, October 31st 2016, 3:21pm

Hi,

Glad to read this is solved.
Adding Project.SetRootPath("...") to OnProjectLoad is the right way.

Some information about the file paths:
Your application seems to be built with relative path names, relative to the makefile execution path.
In the elf file, source file and path information are spread across different sections and entries.
With the information from objdump or readelf you can reconstruct the full path with the additional fields of the file description,
this is what Ozone does as well.

Best regards
Johannes