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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_avnet_lx9microbard/] [synthesis/] [xilinx/] [1_initialize_pmem.sh] - Rev 198

Go to most recent revision | Compare with Previous | Blame | View Log

#!/bin/bash
###############################################################################
#                                                                             #
#                       Xilinx RAM update script for LINUX                    #
#                                                                             #
###############################################################################
# In order to figure out where the RAM cells are mapped in the target
# FPGA, please use the utility provided by Xilinx:
#                  > export DISPLAY=:0
#                  > fpga_editor
 
###############################################################################
#                            Parameter Check                                  #
###############################################################################
EXPECTED_ARGS=1
if [ $# -ne $EXPECTED_ARGS ]; then
    echo ""
    echo "ERROR          : wrong number of arguments"
    echo "USAGE          : ./1_initialize_pmem.sh <test name>"
    echo "EXAMPLE        : ./1_initialize_pmem.sh    leds"
    echo ""
    echo "AVAILABLE TESTS:"
    for fullfile in ../../software/* ; do
	filename=$(basename "$fullfile")
	filename="${filename%.*}"
	echo "                  - $filename"
    done
    echo ""
  exit 1
fi
 
###############################################################################
#                     Check if the required files exist                       #
###############################################################################
softdir=../../software/$1;
elffile=../../software/$1/$1.elf;
 
if [ ! -e $softdir ]; then
    echo "Software directory doesn't exist: $softdir"
    exit 1
fi
 
###############################################################################
#                           Update FPGA Bitstream                             #
###############################################################################
 
cd ./WORK
 
# Generate memory file
msp430-objcopy -O ihex ../$elffile ./$1.ihex
../scripts/ihex2mem.tcl -ihex $1.ihex -out $1.mem -mem_size 16384
 
# Update bitstream
data2mem -bm ../scripts/memory.bmm -bd $1.mem -bt openMSP430_fpga.bit -o b $1.bit
 
# Copy new bitstream in the proper directory
cp -f ./$1.bit ../bitstreams
 
cd ../
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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