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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [gccrom] - Rev 193

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

# $Log: not supported by cvs2svn $
# Revision 1.17  2008/04/27 16:05:25  sybreon
# Added optional specs.
#
# Revision 1.16  2008/04/26 18:08:33  sybreon
# Minor cosmetic changes.
#
# Revision 1.15  2008/04/26 10:03:00  sybreon
# Cleaned up script.
#
# Revision 1.14  2008/01/31 19:07:14  sybreon
# Made code work with newlib's malloc();
#
# Revision 1.13  2008/01/19 16:42:54  sybreon
# Uses multiplier + barrel shifter as default.
#
# Revision 1.12  2007/12/11 00:44:32  sybreon
# Modified for AEMB2
#
# Revision 1.11  2007/11/30 17:09:27  sybreon
# Minor code cleanup.
#
# Revision 1.10  2007/11/20 18:35:34  sybreon
# Generate VMEM instead of HEX dumps of programme.
#
# Revision 1.9  2007/11/18 19:41:46  sybreon
# Minor simulation fixes.
#
# Revision 1.8  2007/11/09 20:52:37  sybreon
# Added some compilation optimisations.
#
# Revision 1.7  2007/11/04 05:16:25  sybreon
# Added -msoft-float and -mxl-soft-div compiler flags.
#
# Revision 1.6  2007/11/02 03:25:46  sybreon
# New EDK 3.2 compatible design with optional barrel-shifter and multiplier.
# Fixed various minor data hazard bugs.
# Code compatible with -O0/1/2/3/s generated code.
#
# Revision 1.5  2007/10/22 19:14:38  sybreon
# Recommended to compile code with -O2/3/s
#
# Revision 1.4  2007/04/30 15:57:31  sybreon
# Modified compilation sequence.
#
# Revision 1.3  2007/04/25 22:15:06  sybreon
# Added support for 8-bit and 16-bit data types.
#
# Revision 1.2  2007/04/04 06:14:39  sybreon
# Minor changes
#
# Revision 1.1  2007/03/09 17:41:56  sybreon
# initial import

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.