Skip to content
Snippets Groups Projects
Commit 419e9a01 authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

Add wrapper to execute programmes on our LEON setup

parent cf039d29
Branches
Tags
1 merge request!31Add compression speed test bench
...@@ -5,6 +5,7 @@ objc = 'sparc-elf-gcc' ...@@ -5,6 +5,7 @@ objc = 'sparc-elf-gcc'
ar = 'sparc-elf-ar' ar = 'sparc-elf-ar'
strip = 'sparc-elf-strip' strip = 'sparc-elf-strip'
ld = 'sparc-elf-ld' ld = 'sparc-elf-ld'
exe_wrapper = '@GLOBAL_SOURCE_ROOT@' / 'test' / 'tools' / 'flash_run_leon.sh'
# pkgconfig = ['false'] # pkgconfig = ['false']
# cmake = ['false'] # cmake = ['false']
......
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# This script is custom-tailored for our test setup and may not run everywhere.
bin_path=${1:-}
if [[ -z "$bin_path" ]]; then
echo "usage: $0 <binary file>"
exit 1
fi
rm -f grmon_output
script -c "grmon -freq 80 -ftdi -u -jtagcable 1 -e 'reset; wash; load $bin_path; run; reg i0; exit'" grmon_output
if grep -q "Program exited normally" grmon_output; then
if grep -q "i0 =" grmon_output; then
ret=$(grep 'i0 =' grmon_output | tr -s ' ' | cut -d ' ' -f 4)
exit $ret
fi
fi
exit 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment