Generate gdb-connect file with RTT address automatically
This commit is contained in:
parent
2e4bc42cd5
commit
673edf2261
1
Makefile
1
Makefile
|
@ -89,6 +89,7 @@ openocd:
|
|||
$(OPENOCD) -f interface/jlink.cfg -f ./doc/rpi3_jlink.cfg
|
||||
|
||||
gdb: kernel8.img
|
||||
make nm | grep _SEGGER_RTT | awk '{print $$1}' | ./make-gdb-connect.sh
|
||||
env RUST_GDB=$(GDB) rust-gdb -x gdb-connect kernel8
|
||||
|
||||
gdbdash: kernel8.img
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
target remote :3333
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
# Generate gdb-connect script with given RTT block address, to avoid typing it in manually
|
||||
|
||||
[ $# -ge 1 ] && ADDR="$1" || ADDR=$(cat)
|
||||
|
||||
cat <<EOF > gdb-connect
|
||||
target remote :3333
|
||||
monitor rttserver start 19021 0
|
||||
monitor rtt setup 0x$ADDR 24 "SEGGER RTT"
|
||||
EOF
|
Loading…
Reference in New Issue