AnsweredAssumed Answered

Debug u-boot SPL on NXP imx8mm-evk

Question asked by sne555 on Apr 26, 2020
Latest reply on Apr 27, 2020 by Yuri Muhin



How to debug u-boot SPL on i.MX8M Mini (NXP imx8mm-evk) ?


Why the $pc goes to 0x200 instead of executing spl instruction ?



user@desktop:~/sources/u-boot$ ../binutils-gdb/gdb/gdb -q spl/u-boot-spl
Reading symbols from spl/u-boot-spl...
(gdb) target remote :3333
Remote debugging using :3333
0x000000000000c904 in ?? ()
(gdb) load
Loading section .text, size 0x101c8 lma 0x7e1000
Loading section .rodata, size 0x23a3 lma 0x7f11c8
Loading section .data, size 0x5f80 lma 0x7f3570
Loading section .u_boot_list, size 0x1400 lma 0x7f94f0
Start address 0x00000000007e1000, load size 104683
Transfer rate: 69 KB/sec, 11631 bytes/write.
(gdb) i r pc
pc             0x7e1000            0x7e1000 <_start>

(gdb) x/i 0x7e1000
   0x7e1000 <_start>:    b    0x7e1028 <reset>

(gdb) stepi
0x0000000000000200 in ?? ()
(gdb) i r pc
pc             0x200               0x200

(gdb) x/i 0x200
=> 0x200:    b    0x13dc4



BOOT_MODE[3:0] = 0101 (serial downloader)

openocd 0.10.0 (openocd -f ./tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg -f ./tcl/board/imx8mp-evk.cfg)

GNU gdb (GDB)


Best regards