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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [bin/] [msp430sim] - Diff between revs 202 and 207

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 202 Rev 207
Line 27... Line 27...
#
#
# Author(s):
# Author(s):
#             - Olivier Girard,    olgirard@gmail.com
#             - Olivier Girard,    olgirard@gmail.com
#
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# $Rev: 202 $
# $Rev: 207 $
# $LastChangedBy: olivier.girard $
# $LastChangedBy: olivier.girard $
# $LastChangedDate: 2015-07-01 23:13:32 +0200 (Wed, 01 Jul 2015) $
# $LastChangedDate: 2015-10-20 22:58:27 +0200 (Tue, 20 Oct 2015) $
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
 
 
###############################################################################
###############################################################################
#                            Parse arguments                                  #
#                            Parse arguments                                  #
###############################################################################
###############################################################################
Line 140... Line 140...
echo ""
echo ""
echo " Seed: $seed"
echo " Seed: $seed"
echo ""
echo ""
 
 
# Create links
# Create links
if [ `uname -o` = "Cygwin" ]
if [[ $(uname -s) == CYGWIN* ]];
then
then
    cp $asmfile pmem.s43
    cp $asmfile pmem.s43
    cp $verfile stimulus.v
    cp $verfile stimulus.v
else
else
    ln -s $asmfile pmem.s43
    ln -s $asmfile pmem.s43
Line 152... Line 152...
fi
fi
 
 
# Make local copy of the openMSP403 configuration file
# Make local copy of the openMSP403 configuration file
# and prepare it for MSPGCC preprocessing
# and prepare it for MSPGCC preprocessing
cp  $incfile  ./pmem.h
cp  $incfile  ./pmem.h
sed -i 's/`ifdef/#ifdef/g'         ./pmem.h
sed -ie 's/`ifdef/#ifdef/g'         ./pmem.h
sed -i 's/`else/#else/g'           ./pmem.h
sed -ie 's/`else/#else/g'           ./pmem.h
sed -i 's/`endif/#endif/g'         ./pmem.h
sed -ie 's/`endif/#endif/g'         ./pmem.h
sed -i 's/`define/#define/g'       ./pmem.h
sed -ie 's/`define/#define/g'       ./pmem.h
sed -i 's/`include/\/\/#include/g' ./pmem.h
sed -ie 's/`include/\/\/#include/g' ./pmem.h
sed -i 's/`//g'                    ./pmem.h
sed -ie 's/`//g'                    ./pmem.h
sed -i "s/'//g"                    ./pmem.h
sed -ie "s/'//g"                    ./pmem.h
 
 
# Use MSPGCC preprocessor to extract the Program, Data
# Use MSPGCC preprocessor to extract the Program, Data
# and Peripheral memory sizes
# and Peripheral memory sizes
if command -v msp430-elf-gcc >/dev/null; then
if command -v msp430-elf-gcc >/dev/null; then
    msp430-elf-gcc -E -P -x c ../bin/omsp_config.sh > pmem.sh
    msp430-elf-gcc -E -P -x c ../bin/omsp_config.sh > pmem.sh
else
else
    msp430-gcc     -E -P -x c ../bin/omsp_config.sh > pmem.sh
    msp430-gcc     -E -P -x c ../bin/omsp_config.sh > pmem.sh
fi
fi
 
 
# Source the extracted configuration file
# Source the extracted configuration file
 
if [[ $(uname -s) == CYGWIN* ]];
 
then
 
dos2unix pmem.sh
 
fi
source pmem.sh
source pmem.sh
 
 
# Compile assembler code
# Compile assembler code
echo "Compile, link & generate IHEX file (Program Memory: $pmemsize B, Data Memory: $dmemsize B, Peripheral Space: $persize B)..."
echo "Compile, link & generate IHEX file (Program Memory: $pmemsize B, Data Memory: $dmemsize B, Peripheral Space: $persize B)..."
../bin/asm2ihex.sh  pmem pmem.s43 $linkfile $headfile $pmemsize $dmemsize $persize
../bin/asm2ihex.sh  pmem pmem.s43 $linkfile $headfile $pmemsize $dmemsize $persize

powered by: WebSVN 2.1.0

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