#!/usr/bin/bash ############################################################################### # # Copyright (C) 2009-2013 Nintendo. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # ############################################################################### source $(dirname "$0")/xmain.sh #============================== #DEBUG RPX #This script runs an RPX under #debug mode # #VERSION 1.4 #============================== displayHelp(){ FIL=$(basename "$0") echo "Debug RPX Script Options (optional): -b : RPX is a debug version (default NDEBUG) -u : Title is on USB (default: PCFS) -n : Title is on NAND (default: PCFS) -r : location of RPX (not including .rpx) --help -h --h -help : Display help Options (last optional): -a : arguments to run the RPX with Usage: $FIL [optionals] [-a ...] Example: #Using first RPX in current working directory (NDEBUG) $FIL #---or--- #Specify parameters (args = anything past -a) $FIL -u -a -x 30 -y 20 #---or--- #Specify absolute or relative path to a DEBUG RPX $FIL -b -u -r \"\$CAFE_ROOT/system/bin/\$TOOLCHAIN/\$PLATFORM\"/demo/helloworld/NDEBUG/helloworld" exit $1 } initFlags #TITLE_PCFS=0 #debug via PCFS (default) #parse user input ARG=("$@") for((i=0;i<$#;++i));do case "${ARG[i]}" in #path to RPX -r)if [ $((++i)) -ge $# ];then break fi FIL="${ARG[i]}";; #RPX arguments -a)ARG="${ARG[@]:$((++i))}" break;; #debug build of RPX -b)FLG=$((FLG|DBG_BUILD));; #debug title on USB -u)FLG=$((FLG|TITLE_USB));; #debug title on MLC -n)FLG=$((FLG|TITLE_MLC));; #display help and exit -h|--h|-help|--help) displayHelp 0;; esac done if [ $((++i)) -ge $# ];then unset ARG fi i= #verify user input getRPX #sync the session doSync #execute debug function runDBG