Analog Devices ee110 Application Notes

aa Engineer To Engineer Note EE-110
Technical Notes on using Analog Devices’ DSP components and development tools
Phone: (800) ANALOG-D, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com, WEB: www.analog.com/dsp
A Quick Primer on ELF and DWARF
Introduction
The 4.1 VisualDSP® SHARC® and all newer VisualDSP tools for other ADI DSPs will generate ELF/DWARF-2 object files and executables. This application note will help explain what this means for users, especially users that have been using the
3.3 and 4.0 VisualDSP (SHARC) tools. It will also explain why the change has been made.
ELF Object File Format
ELF (Executable and Linking Format) is an object file format originally developed by Unix System Laboratories. It was selected by the Tools Interface Standards committee as the basis for a portable object file format that works on a variety of operating systems. Refer to the standard “Executable and Linkable Format (ELF), Tools Interface Standards (TIS), Portable Formats Specification, Version 1.1.”
is a debugging information format that does not favor the design of any compiler or debugger. It was also designed to meet the debugging needs of different languages in a unified manner. ADI uses version 2 of the DWARF standard, sometimes referred to as DWARF-2. Refer to the standard, “DWARF Debugging Information Format, Tools Interface Standards (TIS), Portable Formats Specification, Version 1.1”.
In ADI tools, the debugging information produced by the compiler and assembler is in DWARF-2 format. The VisualDSP debugger reads DWARF­2 debug information.
The software development tools for the ADSP­21160 (now in beta) and the ADSP-TS001 (now in beta) are complete ELF/DWARF-2 toolsets. The tools for the SHARC will be ELF/DWARF-2 starting with the 4.1 release. The ADSP-218x and ADSP-219x tools will be ELF/DWARF-2 starting with the 7.0 release. All toolsets for new processors will be ELF/DWARF-2.
In the Analog Devices, Inc. (ADI) tools all linkable objects (.doj) and all executable images (.dxe) are stored as ELF files.
Previous formats
The 3.3 SHARC tools produced COFF object files and executables. The debugging information was in SDB. (A good reference for COFF and SDB is
ADI started using ELF in the 4.0 VisualDSP tools for SHARC. Presently, the only ADI software development tools that do not use ELF are the ADSP-218x tools that generate AEXE; this will change with the 7.0 release of the ADSP-218x tools.
“Understanding and Using COFF” by Gintaras R. Gircys”, O’reilly & Associates). The 4.0 VisualDSP SHARC tools used ELF object files but maintained the SDB format for debug information. The 4.1 SHARC tools will be an ELF/DWARF toolset. (The table below shows object and debug formats for ADI tools).
DWARF debug information format
DWARF is a format for the information generated by compilers, assemblers and linkers that are necessary for symbolic source-level debugging. It
Copyright 2000, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer product design or the use or application of customers’ products or for any infringements of patents or rights of others which may result from Analog Devices assistance. All trademarks and logos are property of their respective holders. Information furnished by Analog Devices Applications and Development Tools Engineers is believed to be accurate and reliable, however no responsibility is assumed by Analog Devices regarding the technical accuracy of the content provided in all Analog Devices’ Engineer-to-Engineer Notes.
The ADSP-218x tools use AEXE as an object file format. The 7.0 release of theADSP- 218x tools will be an ELF/DWARF toolset.
The following table shows object and debug formats for ADI tools:
Toolset 3.3
SHARC
Object
COFF ELF ELF AEXE ELF ELF ELF
4.0 SHARC
4.1 SHARC
these users can convert their libraries to ELF and
6.1 218x 7.0 218x 21160 TS001
proceed using the latest tools.
Format Debug
SDB SDB DWARF NONE DWARF DWARFDWAR
Format Object file
.obj .doj .doj .obj .doj .doj .doj
extension Executable
.exe .dxe .dxe .exe .dxe .dxe .dxe
extension
Object File Implications
If you are starting a new program the object file format and debug information format shouldn't affect how you program at all. There are the general advantages of using industry standard file formats as described towards the end of this note.
When the SHARC 4.0 tools were released, users were able to convert COFF object files to ELF. In addition, the VisualDSP debugger in the 4.0 release was able to read and debug COFF object files directly (without conversion). Users who had 3.3
generated files that contained debugging information If you have existing code targeted for a non-ADI part, the object file format shouldn't affect you either. You will need to recompile your C code, translate and assemble any assembly code, and then proceed.
would find that the object file converter would
preserve the debugging information. This behavior is
unique to the 4.0 SHARC tools (and the 4.0.1
service pack). In general, most object file
converters will not preserve debug information.
F
If you are migrating from previous versions of ADI tools, you may notice a difference. The ELF/DWARF object format is richer in information than the previous object formats. ADI will provide object file converters (e.g., coff2elf that converts from SHARC 3.3 COFF format to ELF, or aexe2elf that converts from 218x AEXE format to ELF) that will convert existing object files and
A SHARC Example
If you had an object library of math routines that
were in COFF format, you would be able to run the
coff2elf conversion tool over the library to produce
an object library of math routines that were in ELF
format. You could then use the ELF/DWARF
tools for the rest of your development. You would
be able to use the math routines as before. executables to the ELF/DWARF format.
Converting an Existing Object File with Debug
ADI recommends using the latest tools to rebuild from source. But in many cases users will have libraries for which they may not have source code. Using the object file converters
EE-110 Page 2
Technical Notes on using Analog Devices’ DSP components and development tools
Phone: (800) ANALOG-D, FAX: (781)461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com,
WEB: www.analog.com/dsp
Information
If you have an existing object file that already
contains debug information you have two choices.
If you have the source you can recompile to
Loading...
+ 2 hidden pages