From e40f3c989f4c00199ff1e00ac794bd365d482bc9 Mon Sep 17 00:00:00 2001 From: Rickey Fehr Date: Sat, 18 Oct 2025 17:35:53 -0700 Subject: [PATCH] Fix memory map script --- scripts/get_memory_map.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/get_memory_map.sh b/scripts/get_memory_map.sh index 035c952..095be49 100755 --- a/scripts/get_memory_map.sh +++ b/scripts/get_memory_map.sh @@ -2,15 +2,22 @@ set -euo pipefail -POOL_DEF_FILE='./include/pools.def' -ELF_FILE="${1-./build/balatro-gba.elf}" +ELF_FILE="${ELF_FILE-./build/balatro-gba.elf}" +POOL_DEF_FILE="${POOL_DEF_FILE-./include/def_balatro_mempool.h}" READELF="${READELF-/opt/devkitpro/devkitARM/bin/arm-none-eabi-readelf}" TOTAL_BYTES=0 +if [ ! -f "$POOL_DEF_FILE" ]; then + echo "Mempool definition file not found: $POOL_DEF_FILE" + echo "You can set your mempool definition file with:" + echo " POOL_DEF_FILE= $(basename $0)" + exit 1 +fi + if [ ! -f "$ELF_FILE" ]; then echo "elf file not found: $ELF_FILE" - echo "You can pass your elf file with:" - echo " $(basename $0) " + echo "You can set your elf file with:" + echo " ELF_FILE= $(basename $0)" exit 1 fi