Skip to content

Instantly share code, notes, and snippets.

@tnishinaga
Created July 10, 2017 15:34
Show Gist options
  • Save tnishinaga/4787651a7ee32c4b3ea1584f5716c1aa to your computer and use it in GitHub Desktop.
Save tnishinaga/4787651a7ee32c4b3ea1584f5716c1aa to your computer and use it in GitHub Desktop.
STM32F746-discovery boardにkernelを読み込むgdbスクリプト
#!/usr/bin/env python
# wait until SDRAM enabled(U-Boot working)
gdb.execute("monitor reset run")
gdb.execute("monitor sleep 1000")
gdb.execute("monitor halt")
# load dtb and Kernel
gdb.execute("load vmlinux")
gdb.execute("restore arch/arm/boot/dts/stm32f746-disco.dtb binary 0xC0004000")
# set register to boot linux
gdb.execute("set $r0 = 0")
gdb.execute("set $r1 = 0xffffffff")
gdb.execute("set $r2 = 0xC0004000")
# continue
gdb.execute("c")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment