Initial revision
Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@986 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
TARGET=$(basename $1 .c)
|
||||
TARGET_CPU=r3000
|
||||
ROM_WORDADDR_WIDTH=12
|
||||
RAM_WORDADDR_WIDTH=11
|
||||
|
||||
echo Building $TARGET...
|
||||
|
||||
mipsel-elf-as.exe -march=$TARGET_CPU startup.s -o startup.o
|
||||
mipsel-elf-as.exe -march=$TARGET_CPU init.s -o init.o
|
||||
mipsel-elf-as.exe -march=$TARGET_CPU kernel.s -o kernel.o
|
||||
|
||||
#mipsel-elf-gcc -O2 -march=$TARGET_CPU $TARGET.c -o $TARGET.s -L $LIBDIR
|
||||
|
||||
mipsel-elf-gcc -msoft-float -O2 -c utils.c -o utils.o
|
||||
mipsel-elf-gcc -msoft-float -O2 -c $TARGET.c -o $TARGET.o
|
||||
mipsel-elf-ld.exe -G 0 -M -T link.ld startup.o init.o kernel.o utils.o $TARGET.o -o $TARGET.elf -L /usr/local/mipsel-elf/lib -L /usr/local/lib/gcc/mipsel-elf/3.4.6 -lc -lgcc >$TARGET.map
|
||||
mipsel-elf-objdump.exe -d $TARGET.elf > $TARGET.dis
|
||||
|
||||
mipsel-elf-objcopy.exe -j .stext -j .ktext -j .text $TARGET.elf -O binary $TARGET.ROM.bin
|
||||
mipsel-elf-objcopy.exe -j .data $TARGET.elf -O binary $TARGET.RAM.bin
|
||||
|
||||
./romgen.exe $TARGET.ROM.bin $ROM_WORDADDR_WIDTH
|
||||
./ramgen.exe $TARGET.RAM.bin $RAM_WORDADDR_WIDTH
|
||||
|
||||
#xtclsh.exe $TARGET.RAM.tcl
|
||||
#xtclsh.exe $TARGET.ROM.tcl
|
||||
|
||||
echo done.
|
||||
Reference in New Issue
Block a user