summaryrefslogtreecommitdiff
path: root/asmdiff.sh
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-12-16 13:15:54 -0500
committerluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-12-16 13:15:54 -0500
commitaad94c34334ee44f1298175df38f14dc27ae5fb8 (patch)
tree867dfb7640ca19531bd20ee70564b1c51bb6e71e /asmdiff.sh
parent4ecbb91ccb609a83d82665d476d22228a1f88762 (diff)
Fix asmdiff.sh to work without DKP, also improve the makefile command for recognizing a toolchain.
The new command requires the toolchain binary path to exist in the file system before building using a toolchain (to handle the case where gba-dev is uninstalled but $(DEVKITARM) still exists))
Diffstat (limited to 'asmdiff.sh')
-rwxr-xr-xasmdiff.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/asmdiff.sh b/asmdiff.sh
index 9e8749acf..534281fdf 100755
--- a/asmdiff.sh
+++ b/asmdiff.sh
@@ -1,6 +1,11 @@
#!/bin/bash
-OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb"
+if [[ -d "$DEVKITARM/bin/" ]]; then
+ OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump"
+else
+ OBJDUMP_BIN="arm-none-eabi-objdump"
+fi
+OBJDUMP="$OBJDUMP_BIN -D -bbinary -marmv4t -Mforce-thumb"
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump