How To Open Source Code In Trace32

The TRACE32 debugger allows you to test your embedded hardware and software by using the on-chip debug interface. The most common on-chip debug interface is JTAG. A single on-chip debug interface can be used to debug all cores of a multi-core chip.


The cygwin C compiler/linker tools build an elf file with ‘/cygdrive/c’.  You will need to strip out the /cygdrive/c from the elf file, using parameters for the Lauterbach Trace32 data.load.elf command.

Load your elf into Lauterbach Trace32, specifying the following parameters:

data.load.elf <elf_image> /PLUSVM /StripPART 3 /PATH C:\

<elf_image> should contain the drive, path, and file name for your elf image.  For example, <elf_image> could be:


/StripPART does the stripping, and /PATH does the replacement of the stripped portion of the path, providing a root directory for searching for source code.

The StripPART value of “3” specifies that the drive letter (first part) and first two subdirectories (parts two and three, “cygdrive” and “c”, respectively) be removed from all source file paths indicated in the .elf file.

The speed with which Lauterbach is able to find files is proportional to the number of files and directories located under the directory specified via /PATH.  In the data.load.elf example above, the entire C:\ drive is specified as the source code repository. 

If you strip additional parts (directories) off of the elf specified source code locations, and add the corresponding directory to the /PATH switch, the size of the source file tree is reduced.  However, any source code not located under the /PATH directory will not be found.

For example, modify the above data.load.elf command to increase /StripPART parameter to 4, and changing the /PATH parameter to include the NEEK directory:

data.load.elf <elf_image> /PLUSVM /StripPART 4 /PATH C:\NEEK\

would not locate any source code not under the C:\NEEK directory, such as Altera® HAL device drivers.


No Comment.