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:
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: