-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgdb_smarc_g2l_atf_bl2
34 lines (28 loc) · 1.06 KB
/
gdb_smarc_g2l_atf_bl2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This script is meant to debug the SMARC RZ/G2L Arm Trusted Firmware BL2
# Please set the board boot mode to SCIF boot: SW11 ON-OFF-ON-OFF
# It must be copied in the source root folder
# Connect to OpenOCD
# If the script is launched from GDB command line then the next line shall not be commented out
# In Eclipse it is not needed since the connection is attempted by Eclipse itself
#target extended-remote :3333
mon reset
# Re-examine after reset
mon r9a07g044l.a55.0 arp_examine 0
mon r9a07g044l.a55.0 arp_examine 1
mon halt
shell sleep 0.5
# Disable SMP
mon r9a07g044l.a55.0 aarch64 smp off
# Load BL2 code and use related symbols
load ./build/rzg2l/debug/bl2/bl2.elf
shell sleep 1
symbol-file ./build/rzg2l/debug/bl2/bl2.elf
shell sleep 1
# Restore BOOT_ID to the expected value: 0x3 = QSPI boot
mon mww 0x10000 0x3
# Insert HW breakpoint. SW breakpoints are failing because EL3 MMU is enabled
# and apparently memory is set to read only in the corresponding page
hbreak bl2_main
continue
# Set internal RAM to RO to force GDB using HW breakpoints
mem 0x10000 0x2FFFF ro