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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_avnet_lx9microbard/] [synthesis/] [xilinx/] [1_initialize_pmem.sh] - Blame information for rev 157

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

Line No. Rev Author Line
1 157 olivier.gi
#!/bin/bash
2
###############################################################################
3
#                                                                             #
4
#                       Xilinx RAM update script for LINUX                    #
5
#                                                                             #
6
###############################################################################
7
# In order to figure out where the RAM cells are mapped in the target
8
# FPGA, please use the utility provided by Xilinx:
9
#                  > export DISPLAY=:0
10
#                  > fpga_editor
11
 
12
###############################################################################
13
#                            Parameter Check                                  #
14
###############################################################################
15
EXPECTED_ARGS=1
16
if [ $# -ne $EXPECTED_ARGS ]; then
17
    echo ""
18
    echo "ERROR          : wrong number of arguments"
19
    echo "USAGE          : ./1_initialize_pmem.sh <test name>"
20
    echo "EXAMPLE        : ./1_initialize_pmem.sh    leds"
21
    echo ""
22
    echo "AVAILABLE TESTS:"
23
    for fullfile in ../../software/* ; do
24
        filename=$(basename "$fullfile")
25
        filename="${filename%.*}"
26
        echo "                  - $filename"
27
    done
28
    echo ""
29
  exit 1
30
fi
31
 
32
###############################################################################
33
#                     Check if the required files exist                       #
34
###############################################################################
35
softdir=../../software/$1;
36
elffile=../../software/$1/$1.elf;
37
 
38
if [ ! -e $softdir ]; then
39
    echo "Software directory doesn't exist: $softdir"
40
    exit 1
41
fi
42
 
43
###############################################################################
44
#                           Update FPGA Bitstream                             #
45
###############################################################################
46
 
47
cd ./WORK
48
 
49
# Generate memory file
50
msp430-objcopy -O ihex ../$elffile ./$1.ihex
51
../scripts/ihex2mem.tcl -ihex $1.ihex -out $1.mem -mem_size 4096
52
 
53
# Update bitstream
54
data2mem -bm ../scripts/memory.bmm -bd $1.mem -bt openMSP430_fpga.bit -o b $1.bit
55
 
56
# Copy new bitstream in the proper directory
57
cp -f ./$1.bit ../bitstreams
58
 
59
cd ../

powered by: WebSVN 2.1.0

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