Generating IPL debug symbols

To generate symbol information for the IPL, you must recompile both the IPL library and the board's IPL with debug information.

The general procedure for this is as follows:

  1. Build the IPL library and the board's IPL. (Ensure any modifications you require are complete before you build.)
  2. Transfer the IPL to the board (for example, write into flash memory using a flash writer or JTAG, transfer over a serial or network connection, or load from an SD card or other removable media).
  3. Modify the board_name.lnk file to output ELF format.
  4. Recompile the IPL library and the board's IPL source with debug options.
  5. Load the board's IPL ELF file containing debug information into the hardware debugger.
Note: Be sure to synchronize the source code, the IPL burned into flash, and the IPL debug symbols.

To build the IPL library with debug information:

# cd bsp_working_dir/src/hardware/ipl/lib/target/a.le
# make clean
# make CCOPTS=-g
# cp libipl.a bsp_working_dir/board_name/install/processor/lib
# make install 

The above steps recompile the target-specific IPL library (libipl.a) with DWARF debug information and copy this library to the board's install directory, assuming that the BSP is configured to look for this library first in this directory. The make install is optional, and copies libipl.a to /processor/usr/lib.

Modify the board_name.lnk file to output ELF format:

# cd bsp_working_dir/board_name/src/hardware/ipl/boards/board_name

Edit the file board_name.lnk, changing the first lines from:

TARGET(elf32-target)
OUTPUT_FORMAT(raw)
ENTRY(entry_vec)

to:

TARGET(elf32-target)
OUTPUT_FORMAT(elf32-target)
ENTRY(entry_vec)

You can now rebuild the board's IPL to produce symbol and debug information in ELF format. To build the board's IPL with debug information:

# cd bsp_working_dir/board_name/src/hardware/ipl/boards/board_name/target/le
# make clean
# make CCOPTS=-g

The ipl-board_name file is now in ELF format with debug symbols from both the IPL library and the board's IPL.

You can use the objdump utility to view the ELF information. For example, to view the symbol information contained in the ipl-board_name file:

# objdump -t ipl-board_name | less

You can now import the ipl-board_name file into a hardware debugger to provide the symbol information required for debugging. In addition to the ipl-board_name file, the hardware debugger needs the source code listings found in the following directories: