Skip to content

Commit 9470052

Browse files
committed
Added st-link debug instruction
1 parent b24e595 commit 9470052

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

extra/debuging.txt

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
1-
start debugger
1+
debug (J-Link)
22
==============
33
1. Start openocd server:
4-
#openocd -f openocd.cfg
5-
2. Connect to the server using telnet:
6-
#telnet 127.0.0.1 4444
4+
# cd ~/dev/nand_programmer/nand_programmer/
5+
# openocd -f extra/openocd.cfg
6+
2. In new terminal connect to the server using telnet:
7+
# telnet 127.0.0.1 4444
78
3. Reset board:
8-
>reset halt
9-
4. Start GDB:
10-
#../compiler/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi-gdb obj/prog.elf
9+
> reset halt
10+
4. In new terminal start GDB:
11+
# cd ~/dev/nand_programmer/
12+
# compiler/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi-gdb nand_programmer/firmware/obj/prog.elf
1113
5. Connect to board:
1214
>target remote localhost:3333
15+
> b main
16+
> continue
17+
18+
debug (ST-Link)
19+
===============
20+
1. Start st-util:
21+
# LD_LIBRARY_PATH=/usr/local/lib/ st-util
22+
2. In new terminal start gdb
23+
# cd ~/dev/nand_programmer/
24+
# compiler/gcc-arm-none-eabi-4_9-2015q1/bin/arm-none-eabi-gdb nand_programmer/firmware/obj/prog.elf
25+
> tar extended-remote :4242
26+
> load
27+
> b main
28+
> continue
1329

1430
useful commands
1531
===============

0 commit comments

Comments
 (0)