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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [actel_m1a3pl_dev_kit/] [sim/] [rtl_sim/] [bin/] [msp430sim] - Diff between revs 138 and 151

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

Rev 138 Rev 151
Line 114... Line 114...
else
else
    ln -s $elffile pmem.elf
    ln -s $elffile pmem.elf
    ln -s $verfile stimulus.v
    ln -s $verfile stimulus.v
fi
fi
 
 
# Make local copy of the openMSP403 configuration file and remove comments
# Make local copy of the openMSP403 configuration file
cp  $incfile  ./pmem.inc
# and prepare it for MSPGCC preprocessing
sed -i "/^\/\// s,.*,," pmem.inc
cp  $incfile  ./pmem.h
 
sed -i 's/`ifdef/#ifdef/g'   ./pmem.h
 
sed -i 's/`else/#else/g'     ./pmem.h
 
sed -i 's/`endif/#endif/g'   ./pmem.h
 
sed -i 's/`define/#define/g' ./pmem.h
 
sed -i 's/`//g'              ./pmem.h
 
sed -i "s/'//g"              ./pmem.h
 
 
# Get Program memory size
# Use MSPGCC preprocessor to extract the Program, Data
pmemunit=`grep PMEM_SIZE_ pmem.inc | grep -v ifdef | grep -v "//" | cut -d'_' -f4`
# and Peripheral memory sizes
pmemsize=`grep PMEM_SIZE_ pmem.inc | grep -v ifdef | grep -v "//" | cut -d'_' -f3`
msp430-gcc -E -P -x c ../bin/omsp_config.sh > pmem.sh
pmemsize=${pmemsize/p/.}
 
if [ $pmemunit == "KB" ]
# Source the extracted configuration file
  then
source pmem.sh
    pmemsize=`echo "pmemsize=$pmemsize * 1024; pmemsize /= 1; pmemsize" | bc`
 
fi
 
 
 
# Create IHEX file from ELF
# Create IHEX file from ELF
echo "Convert ELF file to IHEX format..."
echo "Convert ELF file to IHEX format..."
msp430-objcopy -O ihex  pmem.elf pmem.ihex
msp430-objcopy -O ihex  pmem.elf pmem.ihex
 
 

powered by: WebSVN 2.1.0

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