Created
July 10, 2017 15:34
-
-
Save tnishinaga/4787651a7ee32c4b3ea1584f5716c1aa to your computer and use it in GitHub Desktop.
STM32F746-discovery boardにkernelを読み込むgdbスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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