OpenCores
URL https://opencores.org/ocsvn/usb_fpga_1_2/usb_fpga_1_2/trunk

Subversion Repositories usb_fpga_1_2

[/] [usb_fpga_1_2/] [trunk/] [bin/] [bmpsdcc.sh] - Diff between revs 8 and 9

Show entire file | Details | Blame | View Log

Rev 8 Rev 9
Line 1... Line 1...
 
#!/bin/bash
 
 
if [ "$1" = ""  ]; then
if [ "$1" = ""  ]; then
    echo "Usage: $0 <C file> <bmp flags> <sdcc flags>"
    echo "Usage: $0 <C file> <bmp flags> <sdcc flags>"
    exit 1
    exit 1
fi
fi
 
 
 
SDCC=$(which sdcc)
 
if [ -z "$SDCC" ]; then
 
    echo "E: bmpsdcc: sdcc is not in PATH."
 
    echo "I: sdcc is not related with ztex and ships with many Linux distributions or "
 
    echo "   is available at http://sdcc.sourceforge.net/ ."
 
    exit 1
 
fi
 
 
exe=""
exe=""
if [ "$WINDIR" != "" ]; then
if [ "$WINDIR" != "" ]; then
    exe=".exe"
    exe=".exe"
fi
fi
 
 
Line 14... Line 24...
    BMP="$BINDIR/bmp$exe"
    BMP="$BINDIR/bmp$exe"
fi
fi
 
 
if [ -f "$BINDIR/peeph.def" ]; then
if [ -f "$BINDIR/peeph.def" ]; then
    PEEPH="--peep-file $BINDIR/peeph.def"
    PEEPH="--peep-file $BINDIR/peeph.def"
 
elif [ -f "/usr/local/share/ztex/peeph.def" ]; then
 
    PEEPH="$PEEPH --peep-file /usr/local/share/ztex/peeph.def"
 
elif [ -f "/usr/share/ztex/peeph.def" ]; then
 
    PEEPH="$PEEPH --peep-file /usr/share/ztex/peeph.def"
fi
fi
 
 
 
 
inp="$1"
inp="$1"
if [ ! -f "$inp" -a -f "$inp.c" ]; then
if [ ! -f "$inp" -a -f "$inp.c" ]; then
    inp="$1.c"
    inp="$1.c"
fi
fi
base=${inp%*.c}
base=${inp%*.c}
Line 41... Line 54...
    ec="$?"
    ec="$?"
    if [ "$ec" != 0 ]; then
    if [ "$ec" != 0 ]; then
        exit $ec
        exit $ec
    fi
    fi
 
 
    sdcc -mmcs51 --code-loc 0x0200 --code-size 0x3800 --xram-loc 0x3A00 --xram-size 0x600 --iram-size 256 $PEEPH $3 $base.tmp.c -o $base.ihx
    "$SDCC" -mmcs51 --code-loc 0x0200 --code-size 0x3800 --xram-loc 0x3A00 --xram-size 0x600 --iram-size 256 $PEEPH $3 $base.tmp.c -o $base.ihx
    ec="$?"
    ec="$?"
    if [ "$ec" != 0 ]; then
    if [ "$ec" != 0 ]; then
        exit $ec
        exit $ec
    fi
    fi
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.