URL
https://opencores.org/ocsvn/m1_core/m1_core/trunk
Subversion Repositories m1_core
[/] [m1_core/] [trunk/] [tools/] [bin/] [compile_test] - Rev 2
Go to most recent revision | Compare with Previous | Blame | View Log
#!/bin/bash## Compile a test for the M1 and build the memory.hex file.## Parameter is test name without extension (e.g. to compile# $M1_ROOT/tests/hello.c) run "compile_test hello".## Requires mipsel-linux-gcc (see Download section on srisc.com).cd $M1_ROOT/testsrm -f *.o *~ *.bin # Make cleanif ( test $# != 1 ) thenecho "compile_test - Script to compile a test for the M1 Core";echo "(C) 2006 by Simply RISC";echo "Usage:";echo " compile_test <TEST_NAME>";echo "where parameter is the test name without extension (e.g. 'hello').";exit 1;fiif ( ! test -e $1.c ) thenecho "ERROR: Test $1.c does not exist into the tests directory!";exit 1;fimipsel-linux-gcc -c -O0 -mips1 $M1_ROOT/tools/src/boot.smipsel-linux-gcc -c -O0 -mips1 $1.cmipsel-linux-ld -Ur -EL -o $1.bin boot.o $1.omipsel-linux-objdump -d -EL -w -z $1.bin > $1.dumpcat $1.dump | dump2hex.php -q > $1.hexcp -f $1.hex code.txtrm -f *.o *~ *.bin # Make clean
Go to most recent revision | Compare with Previous | Blame | View Log
