Does the SDK tool support self relocating applications such as u-boot?
The SDK System Debugger supports source level debugging of self-relocating programs, like u-boot. A self-relocating program is a program which relocates its own code and data sections during run time.
The debug information available in these ELFs does not provide details about where the program sections would be relocated to.
For this reason, you must provide additional information to the debugger about the address to which program sections will be relocated.
This can be done in two ways:
1) Update the System Debugger launch configuration to provide the address to which program sections are relocated.
Check the box for "This is a self-relocating application" and give the address as follows:
Launch the debug configuration. When the program sections are relocated during runtime, the debugger will have enough information to support source level debugging of the relocated sections.
2) Use the memmap command via XSDB to provide the address to which the program sections are allocated. The memmap command in XSDB can be used to add symbol files to the debugger.
This is useful for debugging the applications which are already running on the target, for example, booting from flash. Or, In the case of relocatable elfs (uboot), you can use the reloc option to provide address.
memmap -reloc <addr> -file <path-to-u-boot/u-boot.elf
Next, you will need to find the relocaddr. For u-boot, you can use the bdinfo command:
So, the command here would be as follows:
memmap -reloc 0x77f55000 -file <path-to-u-boot/u-boot.elf