ecos_kernel_test: merge experiment steps 0-2 into a single run

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1443 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
chb
2012-07-09 13:58:47 +00:00
parent 4aa4943ae9
commit bc922a98d3
6 changed files with 232 additions and 184 deletions

View File

@ -0,0 +1,47 @@
#!/bin/bash
set -e
TARGET=experimentInfo.hpp
[ ! -e "$1" ] && echo "usage: $0 ecos_binary.elf" && exit 1
function addrof() { nm -C $1 | (fgrep "$2" || echo 99999999) | awk '{print $1}'; }
cat >$TARGET <<EOF
#pragma once
// autogenerated, don't edit!
EOF
function alldefs() {
cat <<EOF
// user-specified start-function address:
// nm -C $(basename $1)|fgrep cyg_start
#define ECOS_FUNC_ENTRY 0x`addrof $1 cyg_start`
// cyg_test_exit address
#define ECOS_FUNC_FINISH 0x`addrof $1 cyg_test_exit`
// cyg_test_output address
#define ECOS_FUNC_TEST_OUTPUT 0x`addrof $1 cyg_test_output`
// the variable that's increased if ECC corrects an error:
#define ECOS_ERROR_CORRECTED 0x`addrof $1 errors_corrected`
// text begin:
// nm -C $(basename $1)|fgrep _stext
#define ECOS_TEXT_START 0x`addrof $1 _stext`
// text end:
// nm -C $(basename $1)|fgrep _etext
#define ECOS_TEXT_END 0x`addrof $1 _etext`
// number of instructions the target executes under non-error conditions from ENTRY to FINISH:
#define ECOS_NUMINSTR 71618
// number of instructions that are executed additionally for error corrections
// (this is a rough guess ... TODO)
#define ECOS_RECOVERYINSTR 0x2000
EOF
}
alldefs $1 >>$TARGET
cat >>$TARGET <<EOF
EOF