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))
This commit is contained in:
luckytyphlosion 2020-12-16 13:15:54 -05:00
parent 4ecbb91ccb
commit aad94c3433
5 changed files with 10 additions and 5 deletions

View File

@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
ifneq ($(TOOLCHAIN),)
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif

View File

@ -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

View File

@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
ifneq ($(TOOLCHAIN),)
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif

View File

@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
ifneq ($(TOOLCHAIN),)
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif

View File

@ -8,7 +8,7 @@ COMPARE ?= 0
# files, or use arm-none-eabi binaries on the system
# if dkP is not installed on tihs system
ifneq ($(TOOLCHAIN),)
ifneq ($(wildcard $(TOOLCHAIN)/bin),)
export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif