Skip to content

Commit

Permalink
elf2tag: Add -h and --help arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ndim committed Sep 4, 2024
1 parent 30e19f2 commit 9ff51c9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/elf2tag
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ for pgm in sort grep awk avr-objdump avr-nm; do
hash $pgm 2>/dev/null || { echo "$progname: $pgm does not seem to be installed, exiting"; exit 1; }
done

if [ "$1" == "" ]; then
cat <<END
case "$1" in
"" | -h | --help )
cat <<END
Syntax: $progname <file>.elf
Function: output a tagfile suitable for the avrdude disasm -t=<tagfile> command
Options: none
END
exit 1
fi
exit 1
;;
esac

echo "# Automatically generated tagfile via ${progname} ${1}"
avr-objdump -d "$1" | grep '<.*>:' | awk '{
Expand Down

0 comments on commit 9ff51c9

Please sign in to comment.