Using CW USB Tap for source level debugging of an externally built ELF file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using CW USB Tap for source level debugging of an externally built ELF file

413 Views
obimma
Contributor I

Hi all

 

I am using CW for PA 10.0.2 with the latest update installed and also have a USB TAP. What I would like to do is to use the TAP to debug an image built under a different toolchain.

 

I can load the code and run/debug it but I cannot get CW to perform source level debugging, it always says that the source files cannot be found. So as it stands, I can only debug in assembler but I really need to cebug in C. I have followed the instructions in the Targetting Manual but this does not seem to work.

 

Has anyone managed to get this working and if so can you give me some help? Or perhaphs this is not possible as the code was built using a different compiler?

 

Thanks

Obi

Labels (1)
0 Kudos
1 Reply

209 Views
CrasyCat
Specialist III

Hello

 

As the application has not been built within CodeWarrior the debugger has trouble to find the source files if :

  A- The executable file debug info does not include full paths to the  actual source code.

       Depending on the =tools you are using for building you may have an option to store the full path to the

       source files in the debug info.

 

  B- The executable file has been built on another system or you do not have the ability to add full path information

      to the debug information.

     In this case you need to add path mapping information

   

This is done as follows:

  1. Select "Windows" -> "Preferences"
  2. Switch to the "C/C++" > "Debug" -> "Common Source Lookup Path" Panel
  3. Click on "Add ..." button. The Add Source dialog is opened.
  4. In the "Add Source" dialog select "Path Mapping" and click OK.
    An entry "Path Mapping: New Entry" is displayed in the "Common Source Lookup Path" edit box.
  5. Click on this entry (make sure it is highlighted) and click on "Edit ..." button
  6. Define a name for your path Mapping (for example "Library").
  7. Click on the "Add ..." button. The "Specify the mapping paths" dialog is opened.
  8. In the compilation path specify the path displays in the debugger window (d:\_build\eb23_3x50_sp5_pre2\_library for example).
  9. The "Local File System Path" specify the corresponding location on your PC (d:\MyRoot for example)
  10. Click "Apply" to apply the changes
  11. Click "OK" to close the dialog

 

CrasyCat

0 Kudos