How to load binary fiels to i.MX51 with GDB and OpenOCD - ndreys/zodiac-openocd GitHub Wiki
Start OpenOCD as follows:
openocd -f <adapter file> -f board/freescale-imx51-babbage.cfg
Start GDB as follows:
arm-none-eabi-gdb --eval-command="target remote localhost:3333"
Then in GDB's command prompt do the following:
mon reset halt
mon reset init
set arm fallback-mode auto
set debug arm
restore <image file> binary <address>
set $pc=<address>
After which you if you continue execution by using standard GDB stepping commands it would be resumed from the <address>