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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [synthesis/] [xilinx/] [1_initialize_pmem.sh] - Diff between revs 153 and 212

Show entire file | Details | Blame | View Log

Rev 153 Rev 212
Line 39... Line 39...
    echo "Software directory doesn't exist: $softdir"
    echo "Software directory doesn't exist: $softdir"
    exit 1
    exit 1
fi
fi
 
 
###############################################################################
###############################################################################
 
#                           Compile program                                   #
 
###############################################################################
 
echo " -----------------------------------------------"
 
echo "|  COMPILE PROGRAM: $1"
 
echo " -----------------------------------------------"
 
echo ""
 
 
 
cd $softdir
 
make clean
 
make
 
cd ../../synthesis/xilinx
 
 
 
###############################################################################
#                           Update FPGA Bitstream                             #
#                           Update FPGA Bitstream                             #
###############################################################################
###############################################################################
 
echo ""
 
echo " -----------------------------------------------"
 
echo "|  UPDATE FPGA BITSTREAM"
 
echo " -----------------------------------------------"
 
echo ""
 
 
cd ./WORK
cd ./WORK
 
 
# Generate memory file
# Generate memory file
 
if command -v msp430-elf-gcc >/dev/null; then
 
    msp430-elf-objcopy -O ihex ../$elffile ./$1.ihex
 
else
msp430-objcopy -O ihex ../$elffile ./$1.ihex
msp430-objcopy -O ihex ../$elffile ./$1.ihex
 
fi
../scripts/ihex2mem.tcl -ihex $1.ihex -out $1.mem -mem_size 4096
../scripts/ihex2mem.tcl -ihex $1.ihex -out $1.mem -mem_size 4096
 
 
# Update bitstream
# Update bitstream
data2mem -bm ../scripts/memory.bmm -bd $1.mem -bt openMSP430_fpga.bit -o b $1.bit
data2mem -bm ../scripts/memory.bmm -bd $1.mem -bt openMSP430_fpga.bit -o b $1.bit
 
 
# Copy new bitstream in the proper directory
# Copy new bitstream in the proper directory
cp -f ./$1.bit ../bitstreams
cp -f ./$1.bit ../bitstreams
 
 
cd ../
cd ../
 
 
 No newline at end of file
 No newline at end of file
 
echo "New bitstream generated:"
 
echo "                          ./bitstreams/$1.bit"
 
echo ""
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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