export USE_THUMB_MODE=NO
export DEBUG=-g
export OPTIM=-O0
export RUN_MODE=RUN_FROM_ROM
export LDSCRIPT=lpc2114-rom.ld
#export LDSCRIPT=../../ciiiemblibs/lib/include/lpc2114_flash.ld

if [ $# -ne 0 ] ; then
  if [ $1 == "romaa" ] ; then
    export ROMAA_MODEL=ROMAA
  else
    echo
    echo "Error: Parametro incorrecto"
    echo
    echo "Opciones:" 
    echo "romaa   --> RoMAA"
    echo "<vacio> --> RoMAA-II por defecto"
    echo
    exit
  fi
else
  export ROMAA_MODEL=ROMAA_II
fi

echo
echo "ROMAA_MODEL:    "$ROMAA_MODEL
echo
echo "USE_THUMB_MODE: "$USE_THUMB_MODE
echo "DEBUG:          "$DEBUG
echo "OPTIM:          "$OPTIM
echo "RUN_MODE:       "$RUN_MODE
echo "LDSCRIPT:       "$LDSCRIPT
echo

make
