URL
https://opencores.org/ocsvn/aemb/aemb/trunk
Subversion Repositories aemb
[/] [aemb/] [trunk/] [sw/] [gccrom] - Rev 207
Go to most recent revision | Compare with Previous | Blame | View Log
#!/bin/sh
# $Id: gccrom,v 1.18 2008-05-01 08:35:04 sybreon Exp $
# Compile using C pre-processor
ELFFILE="rom"
XILFLAGS="-mtune=v5.00 -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul"
CXXFLAGS="-O0"
LNKFLAGS="-Wl,-defsym -Wl,_STACK_SIZE=0x2000 -Wl,-defsym -Wl,_HEAP_SIZE=0x2000"
LIBFLAGS=""
INCFLAGS="-Icc/"
mb-g++ $XILFLAGS $CXXFLAGS $LNKFLAGS $LIBFLAGS $INCFLAGS -specs=aemb.specs $@ -o $ELFFILE && \
echo "xgcc=$?" && \
# Create a text listing of the compiled code
mb-objdump -DSCz $ELFFILE > $ELFFILE.dump && \
echo "dump=$?" && \
# Convert the ELF file to an SREC file
mb-objcopy -O srec $ELFFILE $ELFFILE.srec && \
echo "copy=$?" && \
# Generate a Verilog VMEM file from the SREC file
srec_cat $ELFFILE.srec -o ../sim/dump.vmem -vmem 32 && \
echo "srec=$?" && \
# echo the checksum
MD5=$(sha1sum $ELFFILE | cut -c1-32) && \
echo "sha1=$MD5" && \
# Cleanup code
rm $ELFFILE.srec && rm $ELFFILE
Go to most recent revision | Compare with Previous | Blame | View Log