Skip to content

Commit 8cb6f8a

Browse files
committed
Merge branch 'maint/gdb-fn-bootload'
2 parents 60a5a65 + 3b40748 commit 8cb6f8a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

scripts/jlink.gdb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ monitor reset
1111
# load the firmware into ROM
1212
load
1313

14-
# Set VTOR (Vector Table Offset Register) to where the firmware is located
15-
set *(uint32_t*)0xE000ED08=0x10000
16-
# Set stack pointer to initial stack pointer according to exception table.
17-
set $sp = *(uint32_t*)0x10000
18-
# Set the program counter to the reset handler (second item in exception table)
19-
set $pc = *(uint32_t*)0x10004
14+
define bootload
15+
monitor reset
16+
# Set VTOR (Vector Table Offset Register) to where the firmware is located
17+
set *(uint32_t*)0xE000ED08=0x10000
18+
# Set stack pointer to initial stack pointer according to exception table.
19+
set $sp = *(uint32_t*)0x10000
20+
# Set the program counter to the reset handler (second item in exception table)
21+
set $pc = *(uint32_t*)0x10004
22+
end
23+
bootload
2024

2125
#break Reset_Handler
2226
#break HardFault_Handler

0 commit comments

Comments
 (0)