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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [gccrom] - Blame information for rev 201

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sybreon
#!/bin/sh
2 155 sybreon
# $Id: gccrom,v 1.18 2008-05-01 08:35:04 sybreon Exp $
3 104 sybreon
 
4 133 sybreon
# Compile using C pre-processor
5
ELFFILE="rom"
6 155 sybreon
XILFLAGS="-mtune=v5.00 -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul"
7 133 sybreon
CXXFLAGS="-O0"
8 155 sybreon
LNKFLAGS="-Wl,-defsym -Wl,_STACK_SIZE=0x2000 -Wl,-defsym -Wl,_HEAP_SIZE=0x2000"
9 142 sybreon
LIBFLAGS=""
10 133 sybreon
INCFLAGS="-Icc/"
11 104 sybreon
 
12 201 sybreon
mb-g++ $XILFLAGS $CXXFLAGS $LNKFLAGS $LIBFLAGS $INCFLAGS -specs=aemb.specs $@ -o $ELFFILE && \
13 133 sybreon
echo "xgcc=$?" && \
14
 
15 104 sybreon
# Create a text listing of the compiled code
16 133 sybreon
mb-objdump -DSCz $ELFFILE > $ELFFILE.dump && \
17
echo "dump=$?" && \
18 104 sybreon
 
19
# Convert the ELF file to an SREC file
20 133 sybreon
mb-objcopy -O srec $ELFFILE $ELFFILE.srec && \
21
echo "copy=$?" && \
22 104 sybreon
 
23
# Generate a Verilog VMEM file from the SREC file
24 133 sybreon
srec_cat $ELFFILE.srec -o ../sim/dump.vmem -vmem 32 && \
25
echo "srec=$?" && \
26 104 sybreon
 
27 137 sybreon
# echo the checksum
28
MD5=$(sha1sum $ELFFILE | cut -c1-32) && \
29
echo "sha1=$MD5" && \
30
 
31 104 sybreon
# Cleanup code
32 133 sybreon
rm $ELFFILE.srec && rm $ELFFILE

powered by: WebSVN 2.1.0

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