I tried to follow the steps explained in document AN5137 to debug an application using u-boot, but every Bare Board application that I start with elfboot results with an undefined instruction error. The project I load is always the default project without any added code.
Here is the terminal results of the bootelf:
Hit any key to stop autoboot: 0
=> tftp 82000000 debug-core0.elf
Speed: 1000, full duplex
Using eTSEC1 device
TFTP from server 172.16.208.150; our IP address is 172.16.208.250
Filename 'debug-core0.elf'.
Load address: 0x82000000
Loading: T T ###########
13.7 KiB/s
done
Bytes transferred = 148367 (2438f hex)
=> bootelf
## Starting application at 0x8000027c ...
undefined instruction
pc : [<8000056c>] lr : [<8000054c>]
sp : 9fffaf9c ip : 00000004 fp : 9fffafec
r10: 800003ec r9 : bef24eb4 r8 : 00000001
r7 : 00000000 r6 : bef25db4 r5 : 00000000 r4 : 9fffafd4
r3 : 9fffafd4 r2 : 8000d0dc r1 : 8000d8f4 r0 : 8000d5a0
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...