tools: add dump_crash to recover XFLASH crash dumps
This commit is contained in:
parent
8455c8e585
commit
c79b1dcbfa
@ -12,6 +12,11 @@ Requires ``printcore`` from [Pronterface].
|
|||||||
Dump the content of the entire SRAM using the D2 command.
|
Dump the content of the entire SRAM using the D2 command.
|
||||||
Requires ``printcore`` from [Pronterface].
|
Requires ``printcore`` from [Pronterface].
|
||||||
|
|
||||||
|
### ``dump_crash``
|
||||||
|
|
||||||
|
Dump the content of the last crash dump on MK3+ printers using D21.
|
||||||
|
Requires ``printcore`` from [Pronterface].
|
||||||
|
|
||||||
### ``elf_mem_map``
|
### ``elf_mem_map``
|
||||||
|
|
||||||
Generate a symbol table map with decoded information starting directly from an ELF firmware with DWARF debugging information (which is the default using the stock board definition).
|
Generate a symbol table map with decoded information starting directly from an ELF firmware with DWARF debugging information (which is the default using the stock board definition).
|
||||||
|
17
tools/dump_crash
Executable file
17
tools/dump_crash
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
prg=$(basename "$0")
|
||||||
|
port="$1"
|
||||||
|
if [ -z "$port" -o "$port" = "-h" ]
|
||||||
|
then
|
||||||
|
echo "usage: $0 <port>" >&2
|
||||||
|
echo "Connect to <port> and dump the content of last crash using D21 to stdout" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
tmp=$(mktemp)
|
||||||
|
trap "rm -f \"$tmp\"" EXIT
|
||||||
|
|
||||||
|
echo D21 > "$tmp"
|
||||||
|
printcore -v "$port" "$tmp" 2>&1 | \
|
||||||
|
sed -ne '/^RECV: D21 /,/RECV: ok$/s/^RECV: //p'
|
Loading…
Reference in New Issue
Block a user