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 is as follows:

  1. Modify the IPL source.
  2. Build the IPL library and the board's IPL.
  3. Burn the IPL into the flash memory of the board using a flash burner or JTAG.
  4. Modify the board_name.lnk file to output ELF format.
  5. Recompile the IPL library and the board's IPL source with debug options.
  6. 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.

Some BSPs have been set up to work with SREC format files. However, to generate debug and symbol information to be loaded into the hardware debugger, you must generate ELF-format files.

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:




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.

Note: To rebuild the BSP, you need to change the board_name.lnk file back to outputting SREC format. It's also important to keep the IPL that's burned into the board's flash memory in sync with the generated debug information; if you modify the IPL source, you need to rebuild the BSP, burn the new IPL into flash, and rebuild the IPL symbol and debug information.

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, the hardware debugger needs the source code listings found in the following directories: